mirror of
https://github.com/python/cpython.git
synced 2025-10-11 17:32:49 +00:00
GH-107812: extend socket
's netlink support to FreeBSD (gh-107813)
This commit is contained in:
parent
2ec16fed14
commit
f50c17243a
5 changed files with 23 additions and 1 deletions
|
@ -0,0 +1 @@
|
||||||
|
Extend socket's netlink support to the FreeBSD platform.
|
|
@ -100,6 +100,8 @@ typedef int socklen_t;
|
||||||
# include <asm/types.h>
|
# include <asm/types.h>
|
||||||
# endif
|
# endif
|
||||||
# include <linux/netlink.h>
|
# include <linux/netlink.h>
|
||||||
|
#elif defined(HAVE_NETLINK_NETLINK_H)
|
||||||
|
# include <netlink/netlink.h>
|
||||||
#else
|
#else
|
||||||
# undef AF_NETLINK
|
# undef AF_NETLINK
|
||||||
#endif
|
#endif
|
||||||
|
|
15
configure
generated
vendored
15
configure
generated
vendored
|
@ -11153,6 +11153,7 @@ fi
|
||||||
|
|
||||||
|
|
||||||
# On Linux, netlink.h requires asm/types.h
|
# On Linux, netlink.h requires asm/types.h
|
||||||
|
# On FreeBSD, netlink.h is located in netlink/netlink.h
|
||||||
ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
|
ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
|
||||||
#ifdef HAVE_ASM_TYPES_H
|
#ifdef HAVE_ASM_TYPES_H
|
||||||
#include <asm/types.h>
|
#include <asm/types.h>
|
||||||
|
@ -11167,6 +11168,20 @@ then :
|
||||||
printf "%s\n" "#define HAVE_LINUX_NETLINK_H 1" >>confdefs.h
|
printf "%s\n" "#define HAVE_LINUX_NETLINK_H 1" >>confdefs.h
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
ac_fn_c_check_header_compile "$LINENO" "netlink/netlink.h" "ac_cv_header_netlink_netlink_h" "
|
||||||
|
#ifdef HAVE_ASM_TYPES_H
|
||||||
|
#include <asm/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
"
|
||||||
|
if test "x$ac_cv_header_netlink_netlink_h" = xyes
|
||||||
|
then :
|
||||||
|
printf "%s\n" "#define HAVE_NETLINK_NETLINK_H 1" >>confdefs.h
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# On Linux, qrtr.h requires asm/types.h
|
# On Linux, qrtr.h requires asm/types.h
|
||||||
|
|
|
@ -2880,7 +2880,8 @@ AC_CHECK_HEADERS([net/if.h], [], [],
|
||||||
])
|
])
|
||||||
|
|
||||||
# On Linux, netlink.h requires asm/types.h
|
# On Linux, netlink.h requires asm/types.h
|
||||||
AC_CHECK_HEADERS([linux/netlink.h], [], [], [
|
# On FreeBSD, netlink.h is located in netlink/netlink.h
|
||||||
|
AC_CHECK_HEADERS([linux/netlink.h netlink/netlink.h], [], [], [
|
||||||
#ifdef HAVE_ASM_TYPES_H
|
#ifdef HAVE_ASM_TYPES_H
|
||||||
#include <asm/types.h>
|
#include <asm/types.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -841,6 +841,9 @@
|
||||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||||
#undef HAVE_NETINET_IN_H
|
#undef HAVE_NETINET_IN_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <netlink/netlink.h> header file. */
|
||||||
|
#undef HAVE_NETLINK_NETLINK_H
|
||||||
|
|
||||||
/* Define to 1 if you have the <netpacket/packet.h> header file. */
|
/* Define to 1 if you have the <netpacket/packet.h> header file. */
|
||||||
#undef HAVE_NETPACKET_PACKET_H
|
#undef HAVE_NETPACKET_PACKET_H
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue