diff lang/pypy311/files/patch-rpython_rlib___rsocket__rffi.py @ 201:aa93453cd531

Build PyPy3 for Python implementation 3.11. BUGS: - pypy39 not yet deleted. - Tests are not working yet.
author Franz Glasner <fzglas.hg@dom66.de>
date Wed, 12 Mar 2025 17:01:42 +0100
parents lang/pypy310/files/patch-rpython_rlib___rsocket__rffi.py@9cc467368751
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/pypy311/files/patch-rpython_rlib___rsocket__rffi.py	Wed Mar 12 17:01:42 2025 +0100
@@ -0,0 +1,22 @@
+--- rpython/rlib/_rsocket_rffi.py.orig	2023-12-24 19:15:32 UTC
++++ rpython/rlib/_rsocket_rffi.py
+@@ -16,6 +16,7 @@ _MSVC  = target_platform.name == "msvc"
+ _MINGW = target_platform.name == "mingw32"
+ _SOLARIS = sys.platform == "sunos5"
+ _MACOSX = sys.platform == "darwin"
++_FREEBSD = sys.platform.startswith('freebsd')
+ _HAS_AF_PACKET = sys.platform.startswith('linux')   # only Linux for now
+ 
+ if _POSIX:
+@@ -42,7 +43,10 @@ if _POSIX:
+                      'sys/ioctl.h',
+                     )
+ 
+-    cond_includes = [('AF_NETLINK', 'linux/netlink.h')]
++    if _FREEBSD:
++        cond_includes = [('AF_NETLINK', 'netlink/netlink.h')]
++    else:
++        cond_includes = [('AF_NETLINK', 'linux/netlink.h')]
+ 
+     libraries = ()
+     calling_conv = 'c'