Sahih Bukhari
Prayers (Salat)
Volume: 001 / Book Number: 008 / Hadith Number: 388
Narrated Abu Aiyub Al-Ansari:
The Prophet said, "While defecating, neither face nor turn your back to the Qibla but face either east or west." Abu Aiyub added. "When we arrived in Sham we came across some lavatories facing the Qibla; therefore we turned ourselves while using them and asked for Allah's forgiveness."