Fix getifaddrs() for BSD
This commit is contained in:
parent
0864f5f88b
commit
8162842107
1 changed files with 4 additions and 0 deletions
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
#include "nixio.h"
|
#include "nixio.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
@ -346,6 +347,9 @@ static int nixio_sock_getpeername(lua_State *L) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__linux__) || defined(BSD)
|
#if defined(__linux__) || defined(BSD)
|
||||||
|
#ifdef BSD
|
||||||
|
#include <net/if.h>
|
||||||
|
#endif
|
||||||
#include <ifaddrs.h>
|
#include <ifaddrs.h>
|
||||||
|
|
||||||
static int nixio_getifaddrs(lua_State *L) {
|
static int nixio_getifaddrs(lua_State *L) {
|
||||||
|
|
Loading…
Reference in a new issue