Sufyan narrates with the same chain that the Prophet (peace and blessings be upon him) said, and in this hadith these words are additional: "But face east or west." Abu Ayyub (may Allah be pleased with him) said: We came to Syria and found toilets that had been built facing the qiblah. We would turn away from them and seek forgiveness from Allah.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الطهارة / 429