Sayyiduna Ibn Umar (may Allah be pleased with them both) said: I climbed onto a roof and saw the Messenger of Allah (peace and blessings be upon him) relieving himself between two bricks in the house of Hafsah (may Allah be pleased with her), while he ((peace and blessings be upon him)) was facing towards Bayt al-Maqdis.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 13255