From 2947e7a0db937e884fd7e7b86bfdb407c67e5110 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eivind=20N=C3=A6ss?= Date: Mon, 6 Nov 2023 20:14:07 +0000 Subject: [PATCH] Fix for failure to detect the presence of sockaddr_ll in linux/if_packet.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Eivind Næss --- configure.ac | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 7ee06d3b5..11b62f5ce 100644 --- a/configure.ac +++ b/configure.ac @@ -76,7 +76,16 @@ AM_COND_IF([LINUX], [ linux/if_packet.h \ netinet/if_ether.h \ netpacket/packet.h]) - AC_CHECK_TYPES([struct sockaddr_ll], [], [], [#include ])]) + + AC_MSG_CHECKING([for struct sockaddr_ll in ]) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([@%:@include ], [sizeof(struct sockaddr_ll)])], + [AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_STRUCT_SOCKADDR_LL, 1, [Struct sockaddr_ll is present on system]) + ], + AC_MSG_RESULT([no])) +]) + AC_CHECK_SIZEOF(unsigned int) AC_CHECK_SIZEOF(unsigned long)