Abu Hani said: ‘Amir (al-Sha‘bi), may Allah have mercy on him, was asked about a child who is neither male nor female, neither having a complete male organ nor a complete female organ, and from whose private part urine and stool come out. What will be his share in inheritance? He replied: Half of his share will be as a male and half as a female.
Hadith Referenceسنن دارمي / من كتاب الفرائض / 3004