Fixed a bunch of *bsd warnings