AHMAD 23524:
from Abū Ayyūb al-Anṣārī —
[Machine] The Messenger of Allah ﷺ said: When one of you goes to the toilet, he should not face the Qibla (direction of prayer), but rather, he should turn to the east or west. So, when we arrived in Sham (Syria), we found toilets positioned towards the Qibla, so we shifted direction and sought forgiveness from Allah.
أحمد ٢٣٥٢٤:
عن ابو ايوب الانصاري —
قَالَ رَسُولُ اللهِ ﷺ إِذَا أَتَى أَحَدُكُمُ الْغَائِطَ فَلَا يَسْتَقْبِلَنَّ الْقِبْلَةَ وَلَكِنْ لِيُشَرِّقْ أَوْ لِيُغَرِّبْ فَلَمَّا قَدِمْنَا الشَّامَ وَجَدْنَا مَرَاحِيضَ جُعِلَتْ نَحْوَ الْقِبْلَةِ فَنَنْحَرِفُ وَنَسْتَغْفِرُ اللهَ
hadithunlocked.com