mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-28 20:39:40 +00:00
Assume libcrypt.so.1 if not 2 in more generic way
This commit is contained in:
parent
f346cae683
commit
554e25d6cb
@ -23,10 +23,10 @@ def msg_align(len):
|
||||
|
||||
cryptname = ctypes.util.find_library('crypt')
|
||||
if not cryptname:
|
||||
if os.path.exists('/lib64/libcrypt.so.1'):
|
||||
cryptname = 'libcrypt.so.1'
|
||||
elif os.path.exists('/lib64/libcrypt.so.2'):
|
||||
if os.path.exists('/lib64/libcrypt.so.2') or os.path.exists('/usr/lib64/libcrypt.so.2'):
|
||||
cryptname = 'libcrypt.so.2'
|
||||
else:
|
||||
cryptname = 'libcrypt.so.1'
|
||||
c_libcrypt = ctypes.CDLL(cryptname)
|
||||
c_crypt = c_libcrypt.crypt
|
||||
c_crypt.argtypes = (ctypes.c_char_p, ctypes.c_char_p)
|
||||
|
Loading…
Reference in New Issue
Block a user