]> arthur.barton.de Git - netdata.git/commitdiff
portability fixes for header files
authorCosta Tsaousis <costa@tsaousis.gr>
Tue, 20 Dec 2016 18:47:52 +0000 (20:47 +0200)
committerCosta Tsaousis <costa@tsaousis.gr>
Tue, 20 Dec 2016 18:47:52 +0000 (20:47 +0200)
configure.ac
src/common.h

index f5dcf4dfdc5f85f7e22a4cb45b1742b6ce5359b0..d3a362ebdda3e222b4876f6325091a26accfbb4d 100644 (file)
@@ -120,6 +120,8 @@ AC_C__GENERIC
 AC_C___ATOMIC
 AC_CHECK_SIZEOF([void *])
 AC_CANONICAL_HOST
+AC_HEADER_MAJOR
+AC_HEADER_RESOLV
 
 AC_ARG_VAR([SSE_CANDIDATE], [C compiler flags for SSE])
 AS_CASE([$host_cpu],
index 70cb4d6312de9c91c54680de6fd150aefc54755a..ff868b91743eaa70b94a0b4594aac46e28c5ac34 100644 (file)
 #include <strings.h>
 
 #include <arpa/inet.h>
-#include <netinet/in.h>
 #include <netinet/tcp.h>
 
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+#ifdef HAVE_RESOLV_H
+#include <resolv.h>
+#endif
+
 #include <dirent.h>
 #include <fcntl.h>
 #include <getopt.h>
 #include <pwd.h>
 #include <locale.h>
 
+#ifdef HAVE_NETDB_H
 #include <netdb.h>
+#endif
+
 #include <poll.h>
 #include <signal.h>
 #include <syslog.h>
 #include <sys/syscall.h>
 #include <sys/time.h>
 #include <sys/types.h>
-#include <sys/sysmacros.h> // #1408
 #include <sys/wait.h>
 #include <time.h>
 #include <unistd.h>
 #include <uuid/uuid.h>
 
+// #1408
+#ifdef MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#endif
+#ifdef MAJOR_IN_SYSMACROS
+#include <sys/sysmacros.h>
+#endif
+
 /*
 #include <mntent.h>
 */