The Book of Purification (Kitab Al-Taharah)
Muslim :: Book 2 : Hadith 507
Abu Ayyub reported: The Apostle of Allah (may peace be upon him) said: Whenever you go to the desert, neither turn your face nor turn your back towards the Qibla while answering the call of nature, but face towards the east or the west. Abu Ayyub said: When we came to Syria we found that the latrines already built there were facing towards the Qibla. We turned our faces away from them and begged forgiveness of the Lord. He said: Yes.