ports/devel/py-pyinotify/patches/patch-python3_pyinotify_py

18 lines
627 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
https://github.com/seb-m/pyinotify/pull/153
Index: python3/pyinotify.py
--- python3/pyinotify.py.orig
+++ python3/pyinotify.py
@@ -211,6 +211,11 @@ class _CtypesLibcINotifyWrapper(INotifyWrapper):
except (OSError, IOError):
pass # Will attemp to load it with None anyway.
+ # Special handling for OpenBSD where the library is
+ # installed in a subdirectory.
+ if sys.platform.startswith('openbsd'):
+ libc_name = '${LOCALBASE}/lib/inotify/libinotify.so'
+
self._libc = ctypes.CDLL(libc_name, use_errno=True)
self._get_errno_func = ctypes.get_errno