It is narrated from Abdullah bin Ma’qil or Mughfal (the narrator is unsure) that he reports from the Prophet ﷺ that he ﷺ said: "When the time for prayer comes to you in a sheepfold, then pray in it, for it is mercy and blessing. And when the time for prayer comes to you in a camel enclosure, then leave it and pray (outside), for it is created from the jinn. Do you not see that when it is angry, how loudly it bellows from its nose?"
Hadith Referenceمسند الإمام الشافعي / كتاب الصلاة / 175
Hadith Takhrijاسنادة ضعيف: الا ان المتن صحيح اخرجه النسائي المساجد، باب ذکر نهى النبي عن الصلاة في اعطان الابل: 736 - وابن ماجه المساجد، باب الصلاة، في اعطان الابل ومداح الغنم: 768، 769.