Browse Source

configure: detect sys/queue.h presence

Jean-Baptiste Kempf 9 years ago
parent
commit
d6045584c2
2 changed files with 4 additions and 2 deletions
  1. 1 1
      configure.ac
  2. 3 1
      src/netbios_ns.c

+ 1 - 1
configure.ac

@@ -88,7 +88,7 @@ AC_SEARCH_LIBS([clock_gettime], [rt])
 AC_REPLACE_FUNCS([strlcpy])
 AC_REPLACE_FUNCS([clock_gettime])
 
-AC_CHECK_HEADERS([bsd/string.h langinfo.h alloca.h])
+AC_CHECK_HEADERS([bsd/string.h langinfo.h alloca.h sys/queue.h])
 
 ## Configure random device path
 AC_ARG_WITH([urandom], 

+ 3 - 1
src/netbios_ns.c

@@ -37,13 +37,15 @@
 #include <stdbool.h>
 #include <pthread.h>
 #include <sys/time.h>
-#include <sys/queue.h>
 
 #include <unistd.h>
 #include <fcntl.h>
 #include <errno.h>
 #include <assert.h>
 
+#ifdef HAVE_SYS_QUEUE_H
+# include <sys/queue.h>
+#endif
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>