Fixed a bunch of *bsd and hurd warnings