Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) said: What is meant by this verse is the man who follows people (as an attendant) and is simple-minded, who has no desire for or need of women.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13547
It is narrated from Imam al-Sha'bi (may Allah have mercy on him) that what is meant by the saying of Allah Almighty: "or male attendants who have no desire" [Surah al-Nur: 31] is one who has no need of women.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13548
It is narrated from Mujahid (may Allah have mercy on him) concerning the saying of Allah Almighty: "or male attendants who have no desire" [Surah al-Nur: 31], that it refers to one who is concerned with nothing but his stomach, and from whom there is no fear for women. Tawus (may Allah have mercy on him) said: It refers to the foolish person who has no need of women. Al-Hasan (may Allah have mercy on him) said: (It is) the one who has no sense, who does not desire women and whom women do not desire.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13549
Sayyidah Aishah (may Allah be pleased with her) said: A man used to come in to the wives of the Prophet (peace and blessings be upon him); he was effeminate (mukhannath), and they counted him among "those who have no desire" [Surah al-Nur: 31], that is, impotent. One day the Prophet (peace and blessings be upon him) came in while he was sitting with some of his (peace and blessings be upon him) wives, describing a woman: when she comes forward, she comes with four, and when she turns away, she turns with eight. The Prophet (peace and blessings be upon him) said: "Do I not see that this one knows what is here? This one must not enter upon you." So they screened themselves from him.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13550