Full Sharh — Mishkat al-Masabih 2926
وَعَنْ جَابِرٍ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «إِذَا اسْتَهَلَّ الصَّبِيُّ صُلِّيَ عَلَيْهِ وَورث» . رَوَاهُ ابْن مَاجَه والدارمي
English Translation
Jabir reported God’s Messenger as saying, “When an infant has raised its voice and then dies*, prayer is offered over it and it is treated as an heir.” *"And then dies” does not occur in the text, but is obviously to be understood from the context. The position is that when the heir of someone who has died is expecting a child, the division of the property must not be made till the child is born. If the child lives long enough to raise it voice it is entitled to a share in the inheritance. Ibn Majah and Darimi transmitted it.
Source
Mishkat al-Masabih(مشكاة المصابيح)
Inheritance and Wills
Hadith Number
2926