From: Eivind Næss Date: Wed, 8 Nov 2023 05:58:01 +0000 (-0800) Subject: Fix for failure to detect the presence of sockaddr_ll in linux/if_packet.h (#456) X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=f19193e0b52c75f579092325f1bb6361c55de8ab Fix for failure to detect the presence of sockaddr_ll in linux/if_packet.h (#456) Signed-off-by: Eivind Næss --- diff --git a/configure.ac b/configure.ac index 7ee06d3..11b62f5 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)