summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Martini <seb@dbzteam.org>2009-01-06 04:42:40 +0100
committerSebastien Martini <seb@dbzteam.org>2009-01-06 04:42:40 +0100
commit46a3dbeab78c0a1848b219fe8d7ff23bfb565889 (patch)
treee3a208b9199e4b06a1e46d56f57a640b603e1582
parent1a3cb2ee0823102ed8b4f799afaee293344ea860 (diff)
downloadpyinotify-46a3dbeab78c0a1848b219fe8d7ff23bfb565889.tar.gz
Fixed libc version check on arch 64 bits.
-rwxr-xr-xpyinotify.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/pyinotify.py b/pyinotify.py
index 58f0faf..c163800 100755
--- a/pyinotify.py
+++ b/pyinotify.py
@@ -94,16 +94,13 @@ __metaclass__ = type # Use new-style classes by default
# load libc
LIBC = ctypes.cdll.LoadLibrary(ctypes.util.find_library('c'))
-# Fixme: code commented for now, there is a problem on arch 64 bits
-# see http://bugs.python.org/issue4854
-
# the libc version check.
# XXX: Maybe it is better to check if the libc has the needed functions inside?
# Because there are inotify patches for libc 2.3.6.
-#LIBC_VERSION = ctypes.cast(LIBC.gnu_get_libc_version(),
-# ctypes.c_char_p).value
-#if not LIBC_VERSION >= '2.4':
-# raise UnsupportedLibcVersionError(LIBC_VERSION)
+LIBC.gnu_get_libc_version.restype = ctypes.c_char_p
+LIBC_VERSION = LIBC.gnu_get_libc_version()
+if LIBC_VERSION < '2.4':
+ raise UnsupportedLibcVersionError(LIBC_VERSION)
# logging