diff --git a/configure.ac b/configure.ac index 7722b0a..d180466 100644 --- a/configure.ac +++ b/configure.ac @@ -100,7 +100,7 @@ AC_REPLACE_FUNCS([strlcpy]) AC_REPLACE_FUNCS([strndup]) AC_REPLACE_FUNCS([clock_gettime]) -AC_CHECK_HEADERS([bsd/string.h langinfo.h alloca.h sys/queue.h arpa/inet.h]) +AC_CHECK_HEADERS([bsd/string.h langinfo.h alloca.h sys/queue.h arpa/inet.h sys/socket.h]) ## Configure random device path AC_ARG_WITH([urandom], diff --git a/src/netbios_ns.c b/src/netbios_ns.c index 38834c7..f282b56 100644 --- a/src/netbios_ns.c +++ b/src/netbios_ns.c @@ -52,7 +52,8 @@ #ifdef _WIN32 # include # include -#else +#endif +#ifdef HAVE_SYS_SOCKET_H # include #endif diff --git a/src/netbios_session.c b/src/netbios_session.c index f43ded0..b48c256 100644 --- a/src/netbios_session.c +++ b/src/netbios_session.c @@ -39,9 +39,9 @@ #ifdef HAVE_ARPA_INET_H #include #endif -#ifndef _WIN32 +#ifdef HAVE_SYS_SOCKET_H #include -#else +#endif #include "bdsm_debug.h" #include "netbios_session.h"