Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / cffi / darwin-use-libffi-closures.diff
blobfdbec4f6fe4adeeb507dd61078009ad2acb304df
1 diff --git a/src/c/_cffi_backend.c b/src/c/_cffi_backend.c
2 index 537271f..9c3bf94 100644
3 --- a/src/c/_cffi_backend.c
4 +++ b/src/c/_cffi_backend.c
5 @@ -103,7 +103,7 @@
6 # define CFFI_CHECK_FFI_PREP_CIF_VAR 0
7 # define CFFI_CHECK_FFI_PREP_CIF_VAR_MAYBE 0
9 -#elif defined(__APPLE__) && defined(FFI_AVAILABLE_APPLE)
10 +#elif defined(__APPLE__)
12 # define CFFI_CHECK_FFI_CLOSURE_ALLOC __builtin_available(macos 10.15, ios 13, watchos 6, tvos 13, *)
13 # define CFFI_CHECK_FFI_CLOSURE_ALLOC_MAYBE 1
14 @@ -6422,7 +6422,7 @@ static PyObject *b_callback(PyObject *self, PyObject *args)
15 else
16 #endif
18 -#if defined(__APPLE__) && defined(FFI_AVAILABLE_APPLE) && !FFI_LEGACY_CLOSURE_API
19 +#if defined(__APPLE__) && !FFI_LEGACY_CLOSURE_API
20 PyErr_Format(PyExc_SystemError, "ffi_prep_closure_loc() is missing");
21 goto error;
22 #else