Fix check for PF_PACKET, fails with clang

This commit is contained in:
dmiller 2026-04-02 19:14:10 +00:00
parent 6dac43b5d8
commit 33c39cd389
2 changed files with 2 additions and 2 deletions

View file

@ -15219,7 +15219,7 @@ printf %s "checking for Linux PF_PACKET sockets... " >&6; }
int
main (void)
{
int foo() { return ETH_P_ALL; }
int foo = ETH_P_ALL;
;
return 0;
}

View file

@ -149,7 +149,7 @@ AC_DEFUN([AC_DNET_LINUX_PF_PACKET],
[AC_MSG_CHECKING(for Linux PF_PACKET sockets)
AC_TRY_COMPILE([#include <netpacket/packet.h>
#include <linux/if_ether.h>],
[int foo() { return ETH_P_ALL; }],
[int foo = ETH_P_ALL;],
ac_cv_dnet_linux_pf_packet=yes,
ac_cv_dnet_linux_pf_packet=no)
AC_MSG_RESULT($ac_cv_dnet_linux_pf_packet)