It is narrated from Sayyiduna Abu Ayyub (may Allah be pleased with him) that he used to forbid the one going to relieve himself from facing the qiblah, and he would say: "Turn towards the east or the west." (In this narration the narrator did not attribute it to the Prophet (peace and blessings be upon him) as a marfu' report.)
Hadith Referenceالمعجم الكبير للطبراني / باب الخاء / 3929