return None in case of failure, redirect some libs to libc __FORCE_COMMIT__
@@ -21,19 +21,22 @@ caps = builtin_symbols['_capability']
def find_library(name, find_next):
- def cvt(d):
- if d:
+ subst = {
+ 'rt': 'c',
+ 'pthread': 'c',
+ }
+
+ builtin = builtin_symbols.get(subst.get(name, name))
+
+ if builtin:
return {
'name': name,
- 'symbols': d
+ 'symbols': builtin,
}
- return None
-
if 'musl' in caps:
- return cvt(builtin_symbols[name])
+ return None
- def real_find_library():
try:
subprocess.Popen.__patched__
@@ -42,5 +45,3 @@ def find_library(name, find_next):
pass
return find_next(name)
-
- return cvt(builtin_symbols.get(name)) or real_find_library()
