Sahih al-Bukhari, Book 57, Hadith 11 (Bukhari 2974)

Narrated `Abdullah bin `Umar:

Once I went upstairs in Hafsa's house and saw the Prophet (ﷺ) answering the call of nature with his back towards the Qibla and facing Sham.