mirror of
https://github.com/pikami/slstatus.git
synced 2024-11-30 07:15:42 +00:00
Add FreeBSD support for netspeeds, entropy and ip components
This commit is contained in:
parent
b6d0bd2fe4
commit
86849d295b
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
return bprintf("%ju", num);
|
return bprintf("%ju", num);
|
||||||
}
|
}
|
||||||
#elif defined(__OpenBSD__)
|
#elif defined(__OpenBSD__) | defined(__FreeBSD__)
|
||||||
const char *
|
const char *
|
||||||
entropy(void)
|
entropy(void)
|
||||||
{
|
{
|
||||||
|
@ -6,6 +6,9 @@
|
|||||||
#if defined(__OpenBSD__)
|
#if defined(__OpenBSD__)
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
#elif defined(__FreeBSD__)
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../util.h"
|
#include "../util.h"
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
return fmt_human((txbytes - oldtxbytes) * 1000 / interval,
|
return fmt_human((txbytes - oldtxbytes) * 1000 / interval,
|
||||||
1024);
|
1024);
|
||||||
}
|
}
|
||||||
#elif defined(__OpenBSD__)
|
#elif defined(__OpenBSD__) | defined(__FreeBSD__)
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ifaddrs.h>
|
#include <ifaddrs.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user