소스 검색

configure: detect arpa/inet.h presence

Jean-Baptiste Kempf 9 년 전
부모
커밋
512341d8d5
2개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  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 sys/queue.h])
+AC_CHECK_HEADERS([bsd/string.h langinfo.h alloca.h sys/queue.h arpa/inet.h])
 
 ## Configure random device path
 AC_ARG_WITH([urandom], 

+ 3 - 1
src/netbios_ns.c

@@ -46,7 +46,9 @@
 #ifdef HAVE_SYS_QUEUE_H
 # include <sys/queue.h>
 #endif
-#include <arpa/inet.h>
+#ifdef HAVE_ARPA_INET_H
+# include <arpa/inet.h>
+#endif
 
 #include <bdsm/netbios_ns.h>