Переглянути джерело

Check for time.h presence

Fix MSVC & clang (on win32) build
Steve Lhomme 8 роки тому
батько
коміт
ec32bf5db3
3 змінених файлів з 5 додано та 1 видалено
  1. 1 1
      configure.ac
  2. 2 0
      src/netbios_ns.c
  3. 2 0
      src/smb_ntlm.c

+ 1 - 1
configure.ac

@@ -107,7 +107,7 @@ AC_REPLACE_FUNCS([strndup])
 AC_REPLACE_FUNCS([clock_gettime])
 AC_CHECK_FUNCS([pipe _pipe getifaddrs])
 
-AC_CHECK_HEADERS([bsd/string.h langinfo.h alloca.h sys/queue.h arpa/inet.h sys/socket.h ifaddrs.h])
+AC_CHECK_HEADERS([bsd/string.h langinfo.h alloca.h sys/queue.h arpa/inet.h sys/socket.h sys/time.h ifaddrs.h])
 
 ## Configure random device path
 AC_ARG_WITH([urandom], 

+ 2 - 0
src/netbios_ns.c

@@ -36,7 +36,9 @@
 #include <string.h>
 #include <stdbool.h>
 #include <pthread.h>
+#ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
+#endif
 
 #include <unistd.h>
 #include <fcntl.h>

+ 2 - 0
src/smb_ntlm.c

@@ -39,7 +39,9 @@
 #include <wctype.h>
 #include <stdlib.h>
 #include <string.h>
+#ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
+#endif
 #include <unistd.h>
 #include <fcntl.h>