It is narrated from Ibn Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) was asked about a newborn who was born with both a female organ and a male organ: how will he inherit? The Prophet (peace and blessings be upon him) said: "He will be made an heir according to where he urinates from."
Muhammad bin al-Sa'ib al-Kalbi is not used as evidence.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الفرائض / 12518