Bismillah Walhamdulillah Was Salaatu Was Salaam ‘ala Rasulillah
Narrated Abu Huraira (Radi-Allahu ‘anhu):
Allah’s Apostle (Sallallahu ‘Alaihi Wa Sallam) said, “A person is considered in prayer as long as he is waiting for the prayer in the mosque as long as he does not do Hadath.” A non-Arab man asked, “O Abu Huraira! What is Hadath?” I replied, “It is the passing of wind (from the anus) (that is one of the types of Hadath).”
Bukhari Vol. 1 : No. 176