--- hostname/hostname.orig	2013-10-12 15:12:39 UTC
+++ hostname/hostname
@@ -1,6 +1,10 @@
 #ifndef INCLUDED_BOBCAT_HOSTNAME_
 #define INCLUDED_BOBCAT_HOSTNAME_
 
+#if defined(__FreeBSD__) || defined(__DragonFly__)
+#include <sys/socket.h>
+#endif
+
 #include <bobcat/hostent>
 
 namespace FBB
