Code

Fixed the configure script to include net/if.h and/or linux/if.h in the right order...
authorocto <octo>
Fri, 7 Apr 2006 17:41:25 +0000 (17:41 +0000)
committerocto <octo>
Fri, 7 Apr 2006 17:41:25 +0000 (17:41 +0000)
configure.in

index 5150146ea601e688841c0bc8f68737a9f0af18b6..accdd0f94e279b7bbe1f728498d1f637d8204559 100644 (file)
@@ -152,8 +152,16 @@ AC_CHECK_HEADERS(utmp.h)
 AC_CHECK_HEADERS(utmpx.h)
 
 # For traffic plugin
-AC_CHECK_HEADERS(net/if.h)
 AC_CHECK_HEADERS(ifaddrs.h)
+AC_CHECK_HEADERS(net/if.h, [], [],
+[
+#if HAVE_SYS_TYPES_H
+#  include <sys/types.h>
+#endif
+#if HAVE_SYS_SOCKET_H
+#  include <sys/socket.h>
+#endif
+])
 AC_CHECK_HEADERS(linux/if.h, [], [],
 [
 #if HAVE_SYS_TYPES_H
@@ -321,7 +329,11 @@ fi
 AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_obytes],
        [AC_DEFINE(HAVE_STRUCT_IF_DATA, 1, [Define if struct if_data exists and is usable.])],
        [],
-       [#include <net/if.h>])
+       [
+       #include <sys/types.h>
+       #include <sys/socket.h>
+       #include <net/if.h>
+       ])
 AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_bytes],
        [AC_DEFINE(HAVE_STRUCT_NET_DEVICE_STATS, 1, [Define if struct net_device_stats exists and is usable.])],
        [],