Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f50c172

Browse files
authored
GH-107812: extend socket's netlink support to FreeBSD (gh-107813)
1 parent 2ec16fe commit f50c172

File tree

5 files changed

+23
-1
lines changed

5 files changed

+23
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Extend socket's netlink support to the FreeBSD platform.

Modules/socketmodule.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ typedef int socklen_t;
100100
# include <asm/types.h>
101101
# endif
102102
# include <linux/netlink.h>
103+
#elif defined(HAVE_NETLINK_NETLINK_H)
104+
# include <netlink/netlink.h>
103105
#else
104106
# undef AF_NETLINK
105107
#endif

configure

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2880,7 +2880,8 @@ AC_CHECK_HEADERS([net/if.h], [], [],
28802880
])
28812881

28822882
# On Linux, netlink.h requires asm/types.h
2883-
AC_CHECK_HEADERS([linux/netlink.h], [], [], [
2883+
# On FreeBSD, netlink.h is located in netlink/netlink.h
2884+
AC_CHECK_HEADERS([linux/netlink.h netlink/netlink.h], [], [], [
28842885
#ifdef HAVE_ASM_TYPES_H
28852886
#include <asm/types.h>
28862887
#endif

pyconfig.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,9 @@
841841
/* Define to 1 if you have the <netinet/in.h> header file. */
842842
#undef HAVE_NETINET_IN_H
843843

844+
/* Define to 1 if you have the <netlink/netlink.h> header file. */
845+
#undef HAVE_NETLINK_NETLINK_H
846+
844847
/* Define to 1 if you have the <netpacket/packet.h> header file. */
845848
#undef HAVE_NETPACKET_PACKET_H
846849

0 commit comments

Comments
 (0)