From 334f632b160384bb3c8670a9aaf8d5a7f66cdd3e Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sun, 27 Nov 2022 16:06:01 +0100 Subject: [PATCH] Port configure script to C99 Related to: --- spamassassin-configure-c99.patch | 62 ++++++++++++++++++++++++++++++++ spamassassin.spec | 7 +++- 2 files changed, 68 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..1e51d5c --- /dev/null +++ b/spamassassin-configure-c99.patch @@ -0,0 +1,62 @@ +Avoid implicit function declarations in the configure script. +The undeclared exit function comes from autoconf-generated code. +The SHUT_RD and h_errno checks are specific to the spamassassin +package. + +Submitted upstream: + +diff --git a/spamc/configure b/spamc/configure +index d8e5dcf8a21d6a3d..5472d2b009fb9083 100755 +--- a/spamc/configure ++++ b/spamc/configure +@@ -2624,8 +2624,8 @@ main () + 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 +@@ -3553,6 +3553,7 @@ _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ ++#include + #include + #include + int +@@ -4252,6 +4253,7 @@ _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ ++#include + #include + int + main () +diff --git a/spamc/configure.in b/spamc/configure.in +index 42cc998412075086..96769105ef640bc8 100644 +--- a/spamc/configure.in ++++ b/spamc/configure.in +@@ -47,7 +47,8 @@ dnl ---------------------------------------------------------------------- + + AC_CACHE_CHECK([for SHUT_RD], + shutrd, [ +- AC_TRY_COMPILE([#include ++ AC_TRY_COMPILE([#include ++#include + #include ], + [printf ("%d", SHUT_RD); return 0;], + [shutrd=yes], +@@ -89,7 +90,8 @@ dnl ---------------------------------------------------------------------- + + AC_CACHE_CHECK([for h_errno], + herrno, [ +- AC_TRY_COMPILE([#include ], ++ AC_TRY_COMPILE([#include ++#include ], + [printf ("%d", h_errno); return 0;], + [herrno=yes], + [herrno=no]), diff --git a/spamassassin.spec b/spamassassin.spec index a3f3223..310e979 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: 3.4.6 #Release: 0.8.%%{prerev}%%{?dist} -Release: 7%{?dist} +Release: 8%{?dist} License: ASL 2.0 URL: https://spamassassin.apache.org/ Source0: https://www.apache.org/dist/%{name}/source/%{real_name}-%{version}.tar.bz2 @@ -90,6 +90,7 @@ Source17: sa-update.timer # Switch to using gnupg2 instead of gnupg1 Patch0: spamassassin-3.3.2-gnupg2.patch Patch1: spamassassin-3.4.1-add-logfile-homedir-options.patch +Patch2: spamassassin-configure-c99.patch # end of patches Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) %if %{use_systemd} == 0 @@ -209,6 +210,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}" @@ -388,6 +390,9 @@ exit 0 %endif %changelog +* Sun Nov 27 2022 Florian Weimer - 3.4.6-8 +- Port configure script to C99 + * Sat Jul 23 2022 Fedora Release Engineering - 3.4.6-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild