diff options
author | Lawrence D'Anna <lawrence_danna@apple.com> | 2020-07-09 20:12:58 -0700 |
---|---|---|
committer | Lawrence D'Anna <lawrence_danna@apple.com> | 2020-07-09 20:12:58 -0700 |
commit | 549b877275d9104cc313a0b714548b58cb3fdd69 (patch) | |
tree | cf5878a235811463d9d0a362572fdbc500dfeb9a | |
parent | 6e2ce7bdd4741ed2df55ad5c7480a8ef0224f815 (diff) | |
download | cffi-549b877275d9104cc313a0b714548b58cb3fdd69.tar.gz |
only trust ffi_closure_alloc on arm
-rw-r--r-- | c/_cffi_backend.c | 2 | ||||
-rw-r--r-- | setup.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/c/_cffi_backend.c b/c/_cffi_backend.c index 5c5fe45..ed89753 100644 --- a/c/_cffi_backend.c +++ b/c/_cffi_backend.c @@ -84,7 +84,7 @@ * known that on the NetBSD kernel, a different strategy is used which * should not be open to the fork() bug. */ -#ifdef __NetBSD__ +#if defined(__NetBSD__) || (CFFI_LIBFFI_FROM_MACOS && (defined(__arm__) || defined(__arm64__))) # define CFFI_TRUST_LIBFFI #endif @@ -152,7 +152,7 @@ else: if 'darwin' in sys.platform and macosx_deployment_target() >= (10, 15): # use libffi from Mac OS SDK extra_compile_args += ['-iwithsysroot/usr/include/ffi'] - define_macros += [('CFFI_TRUST_LIBFFI', '1'), + define_macros += [('CFFI_LIBFFI_FROM_MACOS', '1'), ('HAVE_FFI_PREP_CIF_VAR', '1')] libraries += ['ffi'] else: |