Fix cross compilation after r258428.

Reviewed by:	pfg
Add static where appropriate.
Sync with some of DragonflyBSD's latest cleanups

Reviewed by:	mjg