Mercurial > hgrepos > FreeBSD > ports > PyPy
diff files/patch-rpython_rlib_rposix.py @ 111:cf8f8a3eea6b
Allow to build PyPy3 v7.3.14 on FreeBSD 13.2.
BUGS: Only Python 7.3.9 is currently implemented fully. Python 7.3.10 is only
begun partly.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 08 Jan 2024 09:37:21 +0100 |
| parents | ffca34182746 |
| children |
line wrap: on
line diff
--- a/files/patch-rpython_rlib_rposix.py Tue Feb 21 22:26:07 2023 +0100 +++ b/files/patch-rpython_rlib_rposix.py Mon Jan 08 09:37:21 2024 +0100 @@ -1,9 +1,19 @@ ---- rpython/rlib/rposix.py.orig 2022-12-29 08:05:46 UTC +--- rpython/rlib/rposix.py.orig 2023-12-24 19:15:32 UTC +++ rpython/rlib/rposix.py -@@ -3014,6 +3014,30 @@ if sys.platform.startswith('linux'): +@@ -214,6 +214,8 @@ else: + includes.append('sys/sysmacros.h') + if sys.platform.startswith('freebsd') or sys.platform.startswith('openbsd'): + includes.append('sys/ttycom.h') ++ if sys.platform.startswith('freebsd') or sys.platform.startswith('openbsd'): ++ includes.append('termios.h') + libraries = ['util'] + + eci = ExternalCompilationInfo( +@@ -3057,6 +3059,30 @@ if sys.platform.startswith('linux'): + """Passes offset==NULL; not support on all OSes""" res = c_sendfile(out_fd, in_fd, lltype.nullptr(_OFF_PTR_T.TO), count) return handle_posix_error('sendfile', res) - ++ +elif sys.platform.startswith('freebsd'): + # FreeBSD + # @@ -27,7 +37,6 @@ + return handle_posix_error('sendfile', res) + res = sbytes[0] + return res -+ + elif not _WIN32: # Neither on Windows nor on Linux, so probably a BSD derivative of - # some sort. Please note that the implementation below is partial;
