SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View file

@ -0,0 +1,31 @@
Index: wurlitzer.py
--- wurlitzer.py.orig
+++ wurlitzer.py
@@ -39,13 +39,20 @@ import warnings
libc = ctypes.CDLL(None)
-try:
- c_stdout_p = ctypes.c_void_p.in_dll(libc, 'stdout')
- c_stderr_p = ctypes.c_void_p.in_dll(libc, 'stderr')
-except ValueError: # pragma: no cover
- # libc.stdout is has a funny name on OS X
- c_stdout_p = ctypes.c_void_p.in_dll(libc, '__stdoutp') # pragma: no cover
- c_stderr_p = ctypes.c_void_p.in_dll(libc, '__stderrp') # pragma: no cover
+if sys.platform.startswith('openbsd'):
+ FILE = (ctypes.c_byte * SIZE_OF_FILE)
+ sFType = (FILE * 3)
+ sFArray = sFType.in_dll(libc, '__sF')
+ c_stdout_p = ctypes.pointer(sFArray[1])
+ c_stderr_p = ctypes.pointer(sFArray[2])
+else:
+ try:
+ c_stdout_p = ctypes.c_void_p.in_dll(libc, 'stdout')
+ c_stderr_p = ctypes.c_void_p.in_dll(libc, 'stderr')
+ except ValueError: # pragma: no cover
+ # libc.stdout is has a funny name on OS X
+ c_stdout_p = ctypes.c_void_p.in_dll(libc, '__stdoutp') # pragma: no cover
+ c_stderr_p = ctypes.c_void_p.in_dll(libc, '__stderrp') # pragma: no cover
STDOUT = 2
PIPE = 3