Buchanan could have repudiated the pro-slavery Lecompton Constitution for Kansas.
He could have supported Douglas for the Democrat nomination in 1860. Douglas could have been elected President in 1860, and that means no secession.
He could have reassigned military commanders so that forts in the south were held by people from the north.
He should have anticipated what the secessionists could do in order to neutralize them.