From 088b12b9903c7057bb0f5bac4dc8bfe439cd6d0c Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Jan 08 2024 09:37:38 +0000 Subject: Fix C compatibility issue --- diff --git a/python-axolotl-curve25519-c99.patch b/python-axolotl-curve25519-c99.patch new file mode 100644 index 0000000..9681a89 --- /dev/null +++ b/python-axolotl-curve25519-c99.patch @@ -0,0 +1,21 @@ +C type error in the Python module definition + +The m_size field at this position has type Py_ssize_t, so you use 0 to +initialize it, and not a pointer constant. Fixes a build error with +current compilers. + +Submitted upstream: + +diff --git a/curve25519module.c b/curve25519module.c +index f4bd3d7adc504cf5..cf8bb45969f486c6 100644 +--- a/curve25519module.c ++++ b/curve25519module.c +@@ -158,7 +158,7 @@ curve25519_functions[] = { + PyModuleDef_HEAD_INIT, + "axolotl_curve25519", + NULL, +- NULL, ++ 0, + curve25519_functions, + }; + diff --git a/python-axolotl-curve25519.spec b/python-axolotl-curve25519.spec index 112baba..e282a63 100644 --- a/python-axolotl-curve25519.spec +++ b/python-axolotl-curve25519.spec @@ -12,6 +12,7 @@ URL: https://github.com/tgalal/python-axolotl-curve25519 Source0: %{url}/archive/%{git_tag}/%{git_tag}.tar.gz # License file for curve/curve25519-donna.[c|h] Source1: LICENSE.curve25519-donna +Patch0: python-axolotl-curve25519-c99.patch BuildRequires: gcc BuildRequires: python3-devel