comparison files/patch-rpython_rlib___rsocket__rffi.py @ 56:585cf5a218ad

Allow to build PyPy-v7.3.14 on FreeBSD 13.2: This needs to handle: - AF_NETLINK support on FreeBSD - build of termios (with extra header termios.h)
author Franz Glasner <fzglas.hg@dom66.de>
date Sun, 07 Jan 2024 22:27:41 +0100
parents
children
comparison
equal deleted inserted replaced
55:b1432f2f3bc4 56:585cf5a218ad
1 --- rpython/rlib/_rsocket_rffi.py.orig 2023-12-23 15:29:17 UTC
2 +++ rpython/rlib/_rsocket_rffi.py
3 @@ -16,6 +16,7 @@ _MSVC = target_platform.name == "msvc"
4 _MINGW = target_platform.name == "mingw32"
5 _SOLARIS = sys.platform == "sunos5"
6 _MACOSX = sys.platform == "darwin"
7 +_FREEBSD = sys.platform.startswith('freebsd')
8 _HAS_AF_PACKET = sys.platform.startswith('linux') # only Linux for now
9
10 if _POSIX:
11 @@ -42,7 +43,10 @@ if _POSIX:
12 'sys/ioctl.h',
13 )
14
15 - cond_includes = [('AF_NETLINK', 'linux/netlink.h')]
16 + if _FREEBSD:
17 + cond_includes = [('AF_NETLINK', 'netlink/netlink.h')]
18 + else:
19 + cond_includes = [('AF_NETLINK', 'linux/netlink.h')]
20
21 libraries = ()
22 calling_conv = 'c'