[packages/python-pymilter] - GCC 15 fix from Fedora
hawk
hawk at pld-linux.org
Tue Aug 12 23:00:04 CEST 2025
commit 987dda72ee3f2704d3e1d2551f67efd9aa4f9cd8
Author: Marcin Krol <hawk at tld-linux.org>
Date: Tue Aug 12 22:59:44 2025 +0200
- GCC 15 fix from Fedora
gcc15.patch | 27 +++++++++++++++++++++++++++
python-pymilter.spec | 4 +++-
2 files changed, 30 insertions(+), 1 deletion(-)
---
diff --git a/python-pymilter.spec b/python-pymilter.spec
index 69a614e..9eb3c20 100644
--- a/python-pymilter.spec
+++ b/python-pymilter.spec
@@ -12,11 +12,12 @@
Summary: Python interface to sendmail milter API
Name: python-%{module}
Version: 1.0.5
-Release: 2
+Release: 3
License: BSD-like
Group: Libraries/Python
Source0: https://files.pythonhosted.org/packages/source/p/pymilter/%{module}-%{version}.tar.gz
# Source0-md5: b5d2498b42331de66c973c3f44fb7ff5
+Patch0: gcc15.patch
URL: https://pymilter.org/
%if %{with python2}
BuildRequires: python-modules >= 1:2.5
@@ -46,6 +47,7 @@ Python interface to sendmail milter API
%prep
%setup -q -n %{module}-%{version}
+%patch -P0 -p1
%build
%if %{with python2}
diff --git a/gcc15.patch b/gcc15.patch
new file mode 100644
index 0000000..e19a0ff
--- /dev/null
+++ b/gcc15.patch
@@ -0,0 +1,27 @@
+From 050b3a15bc00a31968cbdcf627692c1eb2ca3219 Mon Sep 17 00:00:00 2001
+From: Sandro <devel at penguinpee.nl>
+Date: Wed, 12 Mar 2025 23:44:55 +0100
+Subject: [PATCH] Set C standard to C17 explicitely
+
+GCC 15 uses C23 by default. But `libmilter` is not compatible, yet.
+This breaks the build as `bool` is a keyword in C23 (issue #68).
+---
+ setup.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 958feee..a6fe2a0 100644
+--- a/setup.py
++++ b/setup.py
+@@ -36,7 +36,10 @@
+ # set MAX_ML_REPLY to 1 for sendmail < 8.13
+ define_macros = [ ('MAX_ML_REPLY',32) ],
+ # save lots of debugging time testing rfc2553 compliance
+- extra_compile_args = [ "-Werror=implicit-function-declaration" ]
++ extra_compile_args = [
++ "-Werror=implicit-function-declaration",
++ "-std=gnu17",
++ ]
+ ),
+ ],
+ keywords = ['sendmail','milter'],
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-pymilter.git/commitdiff/987dda72ee3f2704d3e1d2551f67efd9aa4f9cd8
More information about the pld-cvs-commit
mailing list