about summary refs log tree commit diff
path: root/pkgs/development/python-modules/cffi
diff options
context:
space:
mode:
authorTravis A. Everett <travis.a.everett@gmail.com>2024-01-01 12:53:38 -0600
committerTravis A. Everett <travis.a.everett@gmail.com>2024-01-12 10:57:43 -0600
commit9700deb9529aae00cbdc803f630fba223de59de4 (patch)
tree09c54019d3fca5a2e6592a4b85b90aedf26435ff /pkgs/development/python-modules/cffi
parent2e4d86eadd7318ac53c1d806eeccbebd7b5ac472 (diff)
python3Packages.cffi: fix missing fn on old macos
If I understand correctly (I may not), cffi is assuming the system
libffi here, which doesn't apply in our case.

The underlying defines (which affect macOS before 10.15) have been in
cffi for 4+ years now, so I'm not quite sure how we haven't picked up
on it already.
Diffstat (limited to 'pkgs/development/python-modules/cffi')
-rw-r--r--pkgs/development/python-modules/cffi/darwin-use-libffi-closures.diff11
1 files changed, 9 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/cffi/darwin-use-libffi-closures.diff b/pkgs/development/python-modules/cffi/darwin-use-libffi-closures.diff
index fdbec4f6fe4ad..4ef51274aa289 100644
--- a/pkgs/development/python-modules/cffi/darwin-use-libffi-closures.diff
+++ b/pkgs/development/python-modules/cffi/darwin-use-libffi-closures.diff
@@ -2,15 +2,22 @@ diff --git a/src/c/_cffi_backend.c b/src/c/_cffi_backend.c
 index 537271f..9c3bf94 100644
 --- a/src/c/_cffi_backend.c
 +++ b/src/c/_cffi_backend.c
-@@ -103,7 +103,7 @@
+@@ -103,11 +103,11 @@
  # define CFFI_CHECK_FFI_PREP_CIF_VAR 0
  # define CFFI_CHECK_FFI_PREP_CIF_VAR_MAYBE 0
  
 -#elif defined(__APPLE__) && defined(FFI_AVAILABLE_APPLE)
 +#elif defined(__APPLE__)
  
- # define CFFI_CHECK_FFI_CLOSURE_ALLOC __builtin_available(macos 10.15, ios 13, watchos 6, tvos 13, *)
+-# define CFFI_CHECK_FFI_CLOSURE_ALLOC __builtin_available(macos 10.15, ios 13, watchos 6, tvos 13, *)
++# define CFFI_CHECK_FFI_CLOSURE_ALLOC 1
  # define CFFI_CHECK_FFI_CLOSURE_ALLOC_MAYBE 1
+-# define CFFI_CHECK_FFI_PREP_CLOSURE_LOC __builtin_available(macos 10.15, ios 13, watchos 6, tvos 13, *)
++# define CFFI_CHECK_FFI_PREP_CLOSURE_LOC 1
+ # define CFFI_CHECK_FFI_PREP_CLOSURE_LOC_MAYBE 1
+-# define CFFI_CHECK_FFI_PREP_CIF_VAR __builtin_available(macos 10.15, ios 13, watchos 6, tvos 13, *)
++# define CFFI_CHECK_FFI_PREP_CIF_VAR 1
+ # define CFFI_CHECK_FFI_PREP_CIF_VAR_MAYBE 1
 @@ -6422,7 +6422,7 @@ static PyObject *b_callback(PyObject *self, PyObject *args)
      else
  #endif