]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Portability fix: Eui48 needs some extra headers on OpenBSD.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 10 Sep 2010 15:41:41 +0000 (17:41 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 10 Sep 2010 15:41:41 +0000 (17:41 +0200)
configure.in
src/eui/Eui48.cc

index 458d4df7f6b804d921b67ff0d0a00e97c50e6ea1..276da36e5ec12717111eeab2bb16e02984a0a9dd 100644 (file)
@@ -1040,12 +1040,24 @@ if test "x${enable_eui:=yes}" = "xyes" ; then
   esac
   AC_CHECK_HEADERS( \
     Iphlpapi.h \
-    net/if_arp.h \
     net/if_dl.h \
-    net/route.h \
     sys/sockio.h \
-    sys/sysctl.h
+    sys/param.h
   )
+  AC_CHECK_HEADERS( \
+    net/if_arp.h \
+    net/route.h, 
+  [], [], [[
+#include <sys/types.h>
+#include <sys/socket.h>
+]])
+
+  # openbsd requires sys/param.h to be included before sysctl.h
+  AC_CHECK_HEADERS(sys/sysctl.h, [], [],
+  [[#if HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+  ]])
 fi
 AC_MSG_NOTICE([EUI (MAC address) controls enabled: $enable_eui])
 SQUID_DEFINE_BOOL(USE_SQUID_EUI,$enable_eui,
index b9311984ab9597d5d3a12487a21eb142bcdd801b..7e76de465626c53fa3a1a475b94a69f6f146f94f 100644 (file)
@@ -65,7 +65,12 @@ struct arpreq {
 #include <Iphlpapi.h>
 #endif
 
-
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
 #if HAVE_SYS_SOCKIO_H
 /* required by Solaris */
 #include <sys/sockio.h>