From bfff0f23a8a50f619b6fef4a150541381cf1d98f Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Tue, 25 Apr 2023 16:57:09 +0200 Subject: [PATCH] Port configure script to C99 Related to: --- pam-1.5.2-configure-c99.patch | 35 +++++++++++++++++++++++++++++++++++ pam.spec | 7 ++++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 pam-1.5.2-configure-c99.patch diff --git a/pam-1.5.2-configure-c99.patch b/pam-1.5.2-configure-c99.patch new file mode 100644 index 0000000..33488e2 --- /dev/null +++ b/pam-1.5.2-configure-c99.patch @@ -0,0 +1,35 @@ +From f07fc9cac78851d3dfad1e8c54ee2671e6351853 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Sun, 11 Sep 2022 16:37:59 +0100 +Subject: [PATCH] configure.ac: fix implicit function declaration in mail spool + directory check + +Fixes the following error with Clang 15 (which makes implicit function +declarations an error by default): +``` ++error: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] + exit(0); + ^ + note: include the header or explicitly provide a declaration for 'exit' +``` + +Signed-off-by: Sam James +--- + configure.ac | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure.ac b/configure.ac +index 79113ad1..b12c8892 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -297,6 +297,7 @@ if test x$with_mailspool != x ; then + else + AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include ++#include + int main() { + #ifdef _PATH_MAILDIR + exit(0); +-- +2.40.0 + diff --git a/pam.spec b/pam.spec index 65e5e07..47c92f0 100644 --- a/pam.spec +++ b/pam.spec @@ -4,7 +4,7 @@ Summary: An extensible library which provides authentication for applications Name: pam Version: 1.5.2 -Release: 17%{?dist} +Release: 18%{?dist} # The library is BSD licensed with option to relicense as GPLv2+ # - this option is redundant as the BSD license allows that anyway. # pam_timestamp and pam_loginuid modules are GPLv2+. @@ -26,6 +26,7 @@ Patch1: pam-1.5.2-redhat-modules.patch Patch2: pam-1.5.0-noflex.patch Patch3: pam-1.3.0-unix-nomsg.patch Patch4: pam-1.5.2-pwhistory-config.patch +Patch5: pam-1.5.2-configure-c99.patch %{load:%{SOURCE3}} @@ -120,6 +121,7 @@ cp %{SOURCE18} . %patch2 -p1 -b .noflex %patch3 -p1 -b .nomsg %patch4 -p1 -b .pwhistory-config +%patch5 -p1 -b .configure-c99 autoreconf -i @@ -355,6 +357,9 @@ done %{_pam_libdir}/libpam_misc.so.%{so_ver}* %changelog +* Tue Apr 25 2023 Arjun Shankar - 1.5.2-18 +- Port configure script to C99 + * Thu Feb 9 2023 Iker Pedrosa - 1.5.2-17 - Remove pam_console (#2166692) - Rebase to pam-redhat-1.2.0