From cf2e6f4b4285fd37f3a18b0b59a1338893ed8330 Mon Sep 17 00:00:00 2001 From: Lars Wendler Date: Fri, 20 Mar 2026 10:37:08 +0100 Subject: [PATCH 1/2] configure.ac: Improve ipv6 option handling --- configure.ac | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 4ff2094..7519129 100644 --- a/configure.ac +++ b/configure.ac @@ -66,13 +66,12 @@ AC_CHECK_FUNCS([memset select strchr strdup strrchr strstr]) OPTFLAGS='' -AC_ARG_ENABLE(ipv6, - AS_HELP_STRING([--disable-ipv6], [Enable IPv6 support @<:@default=yes@:>@]), - [ if test "$enableval" = "no" ; then enable_ipv6=no ; else enable_ipv6=yes ; fi ], +AC_ARG_ENABLE([ipv6], + [AS_HELP_STRING([--disable-ipv6], [Enable IPv6 support @<:@default=yes@:>@])], + [ enable_ipv6="$enableval" ], [ enable_ipv6=yes ]) -if test "$enable_ipv6" = "yes" ; then - AC_SUBST(OPTFLAGS, ["$OPTFLAGS -DUSE_IPV6=1"]) -fi +AS_IF([test "$enable_ipv6" != "no"], + [AC_SUBST(OPTFLAGS, ["$OPTFLAGS -DUSE_IPV6=1"])]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT -- 2.53.0 From 2eaee63568e1a48e60035d33c7fb69788c99f220 Mon Sep 17 00:00:00 2001 From: Lars Wendler Date: Fri, 20 Mar 2026 10:43:55 +0100 Subject: [PATCH 2/2] Fix build with --disable-ipv6 dnstop.c:(.text.startup+0x4d0): undefined reference to `inXaddr_assign_v6' --- dnstop.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dnstop.c b/dnstop.c index e6c9668..5b236a7 100644 --- a/dnstop.c +++ b/dnstop.c @@ -2036,7 +2036,9 @@ main(int argc, char *argv[]) x.s6_addr[i/8] <<= 1; x.s6_addr[i/8] += i < opt_v6_agg ? 1 : 0; } +#if USE_IPV6 inXaddr_assign_v6(&v6mask, &x); +#endif } if (0 == stat(device, &sb)) -- 2.53.0