[hackers] [slstatus] Add FreeBSD support for netspeeds, entropy and ip components || Michael Buch
commit 86849d295b1eb9e18746d8a4fa196fe7b9dce0dc
Author: Michael Buch <michaelbuch12_AT_gmail.com>
AuthorDate: Wed Jan 30 11:21:54 2019 +0000
Commit: Aaron Marcher <me_AT_drkhsh.at>
CommitDate: Thu Feb 7 12:23:01 2019 +0100
Add FreeBSD support for netspeeds, entropy and ip components
diff --git a/components/entropy.c b/components/entropy.c
index 4033ffd..2a485de 100644
--- a/components/entropy.c
+++ b/components/entropy.c
_AT_@ -17,7 +17,7 @@
return bprintf("%ju", num);
}
-#elif defined(__OpenBSD__)
+#elif defined(__OpenBSD__) | defined(__FreeBSD__)
const char *
entropy(void)
{
diff --git a/components/ip.c b/components/ip.c
index a7b1bfd..70724eb 100644
--- a/components/ip.c
+++ b/components/ip.c
_AT_@ -6,6 +6,9 @@
#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"
diff --git a/components/netspeeds.c b/components/netspeeds.c
index 02c030e..0029177 100644
--- a/components/netspeeds.c
+++ b/components/netspeeds.c
_AT_@ -58,7 +58,7 @@
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>
Received on Thu Feb 07 2019 - 12:23:29 CET
This archive was generated by hypermail 2.3.0
: Thu Feb 07 2019 - 12:24:23 CET