return bprintf("%ju", num);
}
-#elif defined(__OpenBSD__)
+#elif defined(__OpenBSD__) | defined(__FreeBSD__)
const char *
entropy(void)
{
#if defined(__OpenBSD__)
#include <sys/types.h>
#include <sys/socket.h>
+#elif defined(__FreeBSD__)
+ #include <netinet/in.h>
+ #include <sys/socket.h>
#endif
#include "../util.h"
return fmt_human((txbytes - oldtxbytes) * 1000 / interval,
1024);
}
-#elif defined(__OpenBSD__)
+#elif defined(__OpenBSD__) | defined(__FreeBSD__)
#include <string.h>
#include <ifaddrs.h>
#include <sys/types.h>