diff options
author | Sebastien Martini <seb@dbzteam.org> | 2009-01-06 04:42:40 +0100 |
---|---|---|
committer | Sebastien Martini <seb@dbzteam.org> | 2009-01-06 04:42:40 +0100 |
commit | 46a3dbeab78c0a1848b219fe8d7ff23bfb565889 (patch) | |
tree | e3a208b9199e4b06a1e46d56f57a640b603e1582 | |
parent | 1a3cb2ee0823102ed8b4f799afaee293344ea860 (diff) | |
download | pyinotify-46a3dbeab78c0a1848b219fe8d7ff23bfb565889.tar.gz |
Fixed libc version check on arch 64 bits.
-rwxr-xr-x | pyinotify.py | 11 |
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 |