aboutsummaryrefslogtreecommitdiffstats
path: root/main/python/musl-find_library.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-01-23 12:01:38 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2016-01-23 12:01:38 +0000
commitedb625cca0c725544e45639f0607930ec4791789 (patch)
treecdeaf339e5d3afcf5e02fdd1e26e8bf2a5d89623 /main/python/musl-find_library.patch
parent681a739eea3fa70f7138d14fc9563c986ff2be2b (diff)
downloadaports-edb625cca0c725544e45639f0607930ec4791789.tar.bz2
aports-edb625cca0c725544e45639f0607930ec4791789.tar.xz
main/python: fix find_library
Bad things happens When libc is dlopened with full path so we only return the filename without path with find_library. ref #5038
Diffstat (limited to 'main/python/musl-find_library.patch')
-rw-r--r--main/python/musl-find_library.patch4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/python/musl-find_library.patch b/main/python/musl-find_library.patch
index aad604c451..2d8d19719c 100644
--- a/main/python/musl-find_library.patch
+++ b/main/python/musl-find_library.patch
@@ -27,13 +27,13 @@ index 1e882e3..b265cc0 100644
+ for d in paths:
+ f = os.path.join(d, name)
+ if _is_elf(f):
-+ return f
++ return os.path.basename(f)
+
+ prefix = os.path.join(d, 'lib'+name)
+ for suffix in ['.so', '.so.*', '.*.so.*']:
+ for f in glob('{0}{1}'.format(prefix, suffix)):
+ if _is_elf(f):
-+ return f
++ return os.path.basename(f)
+
def find_library(name):
- return _findSoname_ldconfig(name) or _get_soname(_findLib_gcc(name))