]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Disable EUI when arpreq is missing and cannot be defined (#2070)
authorFrancesco Chemolli <5175948+kinkie@users.noreply.github.com>
Sat, 31 May 2025 18:40:35 +0000 (18:40 +0000)
committerAmos Jeffries <yadij@users.noreply.github.com>
Tue, 3 Jun 2025 05:59:27 +0000 (17:59 +1200)
OpenBSD 7.7 provides a net/if_arp.h header file,
but it doesn't provide a `struct arpreq`, which
is necessary for our EUI implementation to work.

Disable EUI when arpreq definition is missing,
except on Windows where we provide our own.

configure.ac

index 163dd9622ab780e4bce18c194ded5d3e0a2f0eb1..91d933b640865e56408e55b577cb36997218c840 100644 (file)
@@ -986,6 +986,21 @@ include <windows.h>
   [], [], [[
 #if HAVE_SYS_PARAM_H
 #include <sys/param.h>
+#endif
+  ]])
+  AC_CHECK_MEMBER([struct arpreq.arp_pa],[],[
+    AS_IF([test "x$squid_host_os" != "xmingw" -a "x$squid_host_os" != "xcygwin"],[
+      AC_MSG_NOTICE([OS support for EUI seems incomplete, disabling it])
+      enable_eui=no
+    ])],[[
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#if HAVE_NET_IF_ARP_H
+#include <net/if_arp.h>
 #endif
   ]])
   SQUID_STATE_ROLLBACK(LIBEUI)