The Prophet ﷺ said, "The sun and the moon do not eclipse for anyone's death or birth. So when you see that, call upon Allah , proclaim His greatness, and give in charity."
حدثنا القعنبي عن مالك عن هشام بن عروة عن عروة
أن النبي ﷺ قال الشمس والقمر لا يخسفان لموت أحد ولا لحياته فإذا رأيتم ذلك فادعوا الله عز وجل وكبروا وتصدقوا
Bukhari transmitted it in the Book of Eclipse, Chapter on giving charity during the eclipse, hadith no. 1044, from Qanabi. And Muslim transmitted it in the Book of Eclipse, Chapter on the eclipse prayer, hadith no. 901, from the hadith of Malik through the same chain. It is also found in Muwatta (Yahya's recension), 1/186.