]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix ./configure EUI check (#2338)
authorPavel Timofeev <timp87@gmail.com>
Wed, 7 Jan 2026 23:02:46 +0000 (23:02 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Wed, 7 Jan 2026 23:02:58 +0000 (23:02 +0000)
Fix missing header `sys/socket.h`:

    configure:29217: checking for struct arpreq.arp_pa
    .../net/if_arp.h: error: field has incomplete type 'struct sockaddr'

Fix `ac_aggr.arp_pa` test, replacing it with a test of a data member
that Squid code is actually using:

    conftest.cpp:112:5: error: value of type 'struct sockaddr' is not
        contextually convertible to 'bool'

Discovered while porting Squid v7 to FreeBSD.

configure.ac

index 0872cfbcfef44230ad1b40e70918ac37ce16ca58..1280d1791d95d2276ef64bca2afd28d3899279ed 100644 (file)
@@ -991,7 +991,8 @@ include <windows.h>
 #include <sys/param.h>
 #endif
   ]])
-  AC_CHECK_MEMBER([struct arpreq.arp_pa],[],[
+  AC_CHECK_HEADERS(sys/socket.h)
+  AC_CHECK_MEMBER([struct arpreq.arp_ha.sa_family],[],[
     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