lbry-android/p4a/pythonforandroid/recipes/pyopenssl/fix-dlfcn.patch

23 lines
625 B
Diff
Raw Normal View History

2017-08-13 03:24:00 +02:00
--- pyOpenSSL-0.13.orig/OpenSSL/__init__.py 2011-09-02 17:46:13.000000000 +0200
+++ pyOpenSSL-0.13/OpenSSL/__init__.py 2013-07-29 17:20:15.750079894 +0200
@@ -12,6 +12,11 @@
except AttributeError:
from OpenSSL import crypto
else:
+ # XXX android fix
+ # linux: RTLD_NOW (0x2) | RTLD_GLOBAL (0x100 / 256)
+ # android: RTLD_NOW (0x0) | RTLD_GLOBAL (0x2)
+ flags = 0x2
+ '''
try:
import DLFCN
except ImportError:
@@ -31,6 +36,7 @@
else:
flags = DLFCN.RTLD_NOW | DLFCN.RTLD_GLOBAL
del DLFCN
+ '''
sys.setdlopenflags(flags)
from OpenSSL import crypto