From 78f14cdc7ace242a955341b8831faad8d636ec8b Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 19 Dec 2023 14:51:40 +0100 Subject: [PATCH] Bring back still needed part of configure C compatibility fix --- spamassassin-configure-c99.patch | 28 ++++++++++++++++++++++++++++ spamassassin.spec | 7 ++++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 spamassassin-configure-c99.patch diff --git a/spamassassin-configure-c99.patch b/spamassassin-configure-c99.patch new file mode 100644 index 0000000..740308b --- /dev/null +++ b/spamassassin-configure-c99.patch @@ -0,0 +1,28 @@ +Fix autoconf 2.59 bug that results in an incorrect definition of +STDC_HEADERS with some compilers. + +Raised upstream: + +diff -ur Mail-SpamAssassin-4.0.0.orig/spamc/configure Mail-SpamAssassin-4.0.0/spamc/configure +--- Mail-SpamAssassin-4.0.0.orig/spamc/configure 2022-12-14 07:03:27.000000000 +0100 ++++ Mail-SpamAssassin-4.0.0/spamc/configure 2023-12-19 14:34:05.414644959 +0100 +@@ -2119,7 +2119,7 @@ + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ +- '' \ ++ '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ +@@ -2624,8 +2624,8 @@ + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) +- exit(2); +- exit (0); ++ return 2; ++ return 0; + } + _ACEOF + rm -f conftest$ac_exeext diff --git a/spamassassin.spec b/spamassassin.spec index d3910ab..af2db5c 100644 --- a/spamassassin.spec +++ b/spamassassin.spec @@ -60,7 +60,7 @@ Summary: Spam filter for email which can be invoked from mail delivery agents Name: spamassassin Version: 4.0.0 #Release: 0.8.%%{prerev}%%{?dist} -Release: 7%{?dist} +Release: 8%{?dist} License: Apache-2.0 URL: https://spamassassin.apache.org/ Source0: https://www.apache.org/dist/%{name}/source/%{real_name}-%{version}.tar.bz2 @@ -96,6 +96,7 @@ Source102: https://www.apache.org/dist/spamassassin/KEYS Patch0: spamassassin-4.0.0-gnupg2.patch # add a logfile and homedir for razor Patch1: spamassassin-4.0.0-add-logfile-homedir-options.patch +Patch2: spamassassin-configure-c99.patch # end of patches %if %{use_systemd} == 0 Requires: /sbin/chkconfig /sbin/service @@ -217,6 +218,7 @@ To filter spam for all users, add that line to /etc/procmailrc # Patches 0-99 are RH specific %patch0 -p1 %patch1 -p1 +%patch2 -p1 # end of patches echo "RHEL=%{?rhel} FEDORA=%{?fedora}" @@ -397,6 +399,9 @@ exit 0 %endif %changelog +* Tue Dec 19 2023 Florian Weimer - 4.0.0-8 +- Bring back still needed part of configure C compatibility fix + * Thu Sep 21 2023 Martin Osvald - 4.0.0-7 - SPDX migration