summaryrefslogtreecommitdiff
path: root/python3/pyinotify.py
diff options
context:
space:
mode:
Diffstat (limited to 'python3/pyinotify.py')
-rwxr-xr-xpython3/pyinotify.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/python3/pyinotify.py b/python3/pyinotify.py
index 67a7000..ead7be0 100755
--- a/python3/pyinotify.py
+++ b/python3/pyinotify.py
@@ -200,9 +200,14 @@ class _CtypesLibcINotifyWrapper(INotifyWrapper):
def init(self):
assert ctypes
+
+ try_libc_name = 'c'
+ if sys.platform.startswith('freebsd'):
+ try_libc_name = 'inotify'
+
libc_name = None
try:
- libc_name = ctypes.util.find_library('c')
+ libc_name = ctypes.util.find_library(try_libc_name)
except (OSError, IOError):
pass # Will attemp to load it with None anyway.