Abu Hudhayfah, who was among those who witnessed Badr with the Messenger of Allah ﷺ, adopted Salim as his son and married him to his niece Hind bint Walid bin Utbah. Salim was the freed slave of a woman from the Ansar, just as the Messenger of Allah ﷺ had adopted Zayd. In the days of ignorance, when a man adopted another, people would call the adopted son after him and he would inherit from his estate, until Allah Most High revealed "Call them by the names of their fathers" [Ahzab 33:5]. Then Sahlah came to the Prophet ﷺ, and he mentioned the rest of the hadith.
حدثنا يحيى بن بكير حدثنا الليث عن عقيل عن ابن شهاب أخبرني عروة بن الزبير
أن أبا حذيفة وكان ممن شهد بدرا مع رسول الله ﷺ تبنى سالما وأنكحه بنت أخيه هند بنت الوليد بن عتبة وهو مولى لامرأة من الأنصار كما تبنى رسول الله ﷺ زيدا وكان من تبنى رجلا في الجاهلية دعاه الناس إليه وورث من ميراثه حتى أنزل الله تعالى {ادعوهم لآبائهم} فجاءت سهلة النبي ﷺ فذكر الحديث