Blame SOURCES/00010-2.7.13-binutils-no-dep.patch

8db7d0
diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
8db7d0
index ab10ec5..923d1b7 100644
8db7d0
--- a/Lib/ctypes/util.py
8db7d0
+++ b/Lib/ctypes/util.py
8db7d0
@@ -140,11 +140,15 @@ elif os.name == "posix":
8db7d0
             # assuming GNU binutils / ELF
8db7d0
             if not f:
8db7d0
                 return None
8db7d0
-            cmd = 'if ! type objdump >/dev/null 2>&1; then exit; fi;' \
8db7d0
+            cmd = 'if ! type objdump >/dev/null 2>&1; then exit 10; fi;' \
8db7d0
                   'objdump -p -j .dynamic 2>/dev/null "$1"'
8db7d0
             proc = subprocess.Popen((cmd, '_get_soname', f), shell=True,
8db7d0
                                     stdout=subprocess.PIPE)
8db7d0
             [dump, _] = proc.communicate()
8db7d0
+            if proc.returncode == 10:
8db7d0
+                return os.path.basename(f) #  This is good for GLibc, I think,
8db7d0
+                                           # and a dep on binutils is big (for
8db7d0
+                                           # live CDs).
8db7d0
             res = re.search(br'\sSONAME\s+([^\s]+)', dump)
8db7d0
             if not res:
8db7d0
                 return None