From 5e40d2be2ed34a0e17779248f751c6037da7d727 Mon Sep 17 00:00:00 2001 From: dmiller Date: Thu, 13 Aug 2026 14:54:46 +0000 Subject: [PATCH] Stop m4 from mangling C source in libpcap check --- acinclude.m4 | 8 ++++---- configure | 4 ++-- ncat/configure | 4 ++-- nping/configure | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index e185898b5..5db437615 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -34,10 +34,10 @@ AC_DEFUN([PCAP_IS_SUITABLE], [ AC_CHECK_HEADERS(sys/ioccom.h sys/time.h net/bpf.h) AC_MSG_CHECKING(if libpcap is suitable) - AC_RUN_IFELSE([AC_LANG_PROGRAM([ + AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include extern char pcap_version[]; -], [ +]], [ int major, minor1, minor2; sscanf(pcap_version,"%d.%d.%d", &major, &minor1, &minor2); if (major > 0) @@ -47,7 +47,7 @@ extern char pcap_version[]; if (minor2 < 4) return 1; ])], [ - AC_RUN_IFELSE([AC_LANG_PROGRAM([ + AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include #include #ifdef HAVE_SYS_IOCCOM_H @@ -60,7 +60,7 @@ extern char pcap_version[]; #include #endif extern char pcap_version[]; -], [ +]], [ int major, minor; sscanf(pcap_version,"%d.%d", &major, &minor); if ((major == 1 && minor >= 1) || major > 1) diff --git a/configure b/configure index 2c9005462..190fb6c5e 100755 --- a/configure +++ b/configure @@ -7448,7 +7448,7 @@ else $as_nop /* end confdefs.h. */ #include -extern char pcap_version; +extern char pcap_version[]; int main (void) @@ -7491,7 +7491,7 @@ else $as_nop #ifdef HAVE_NET_BPF_H #include #endif -extern char pcap_version; +extern char pcap_version[]; int main (void) diff --git a/ncat/configure b/ncat/configure index c398c62f3..c06a16d5e 100755 --- a/ncat/configure +++ b/ncat/configure @@ -5758,7 +5758,7 @@ else $as_nop /* end confdefs.h. */ #include -extern char pcap_version; +extern char pcap_version[]; int main (void) @@ -5801,7 +5801,7 @@ else $as_nop #ifdef HAVE_NET_BPF_H #include #endif -extern char pcap_version; +extern char pcap_version[]; int main (void) diff --git a/nping/configure b/nping/configure index f61c93a09..8f6f2aa84 100755 --- a/nping/configure +++ b/nping/configure @@ -6251,7 +6251,7 @@ else $as_nop /* end confdefs.h. */ #include -extern char pcap_version; +extern char pcap_version[]; int main (void) @@ -6294,7 +6294,7 @@ else $as_nop #ifdef HAVE_NET_BPF_H #include #endif -extern char pcap_version; +extern char pcap_version[]; int main (void)