Przeglądaj źródła

configure.ac: Detect sys/socket.h and update inclusion guards

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Hugo Beauzée-Luyssen 9 lat temu
rodzic
commit
4b3d783297
3 zmienionych plików z 5 dodań i 4 usunięć
  1. 1 1
      configure.ac
  2. 2 1
      src/netbios_ns.c
  3. 2 2
      src/netbios_session.c

+ 1 - 1
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], 

+ 2 - 1
src/netbios_ns.c

@@ -52,7 +52,8 @@
 #ifdef _WIN32
 # include <winsock2.h>
 # include <ws2tcpip.h>
-#else
+#endif
+#ifdef HAVE_SYS_SOCKET_H
 # include <sys/socket.h>
 #endif
 

+ 2 - 2
src/netbios_session.c

@@ -39,9 +39,9 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifndef _WIN32
+#ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
-#else
+#endif
 
 #include "bdsm_debug.h"
 #include "netbios_session.h"