From cba141233b8092d6bf8b1656986b20a724582a32 Mon Sep 17 00:00:00 2001 From: jchzhou Date: Wed, 27 Aug 2025 12:02:40 +0800 Subject: [PATCH] backport a patch for fixing Wincompatible-pointer-types when building with newer compilers --- audit.spec | 7 +++++- backport-Fix-introduced-warnings.patch | 34 ++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 backport-Fix-introduced-warnings.patch diff --git a/audit.spec b/audit.spec index 93b34b9..0c6da64 100644 --- a/audit.spec +++ b/audit.spec @@ -2,7 +2,7 @@ Summary: User space tools for kernel auditing Name: audit Epoch: 1 Version: 3.1.2 -Release: 12 +Release: 13 License: GPLv2+ and LGPLv2+ URL: https://people.redhat.com/sgrubb/audit/ Source0: https://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz @@ -65,6 +65,8 @@ Patch51: backport-make-slist_last-a-static-function.patch Patch52: backport-code-cleanup-constification-deadcode-removal-lower-s.patch # https://github.com/linux-audit/audit-userspace/commit/8c7eaa7ead6c70486623674c19d649f3831578ad Patch53: backport-Implicit-builtin-functions.patch +# https://github.com/linux-audit/audit-userspace/commit/b8479df52ce3f286ba010268527c9c280abaf478 +Patch54: backport-Fix-introduced-warnings.patch BuildRequires: gcc swig libtool systemd kernel-headers >= 2.6.29 BuildRequires: openldap-devel krb5-devel libcap-ng-devel @@ -406,6 +408,9 @@ fi %attr(644,root,root) %{_mandir}/man8/*.8.gz %changelog +* Tue Aug 26 2025 jchzhou - 1:3.1.2-13 +- backport patches for fixing Wincompatible-pointer-types when building with newer compilers + * Tue Aug 26 2025 jchzhou - 1:3.1.2-12 - backport patches for fixing Wimplicit-function-declaration, Wbuiltin-declaration-mismatch when building with newer compilers diff --git a/backport-Fix-introduced-warnings.patch b/backport-Fix-introduced-warnings.patch new file mode 100644 index 0000000..d4f1569 --- /dev/null +++ b/backport-Fix-introduced-warnings.patch @@ -0,0 +1,34 @@ +From b8479df52ce3f286ba010268527c9c280abaf478 Mon Sep 17 00:00:00 2001 +From: Steve Grubb +Date: Sun, 5 Nov 2023 15:10:46 -0500 +Subject: [PATCH] Fix introduced warnings + +--- + src/auditd-config.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/auditd-config.c b/src/auditd-config.c +index 6a860fa..b2992e6 100644 +--- a/src/auditd-config.c ++++ b/src/auditd-config.c +@@ -53,7 +53,7 @@ struct nv_pair + struct kw_pair + { + const char *name; +- int (*parser)(struct nv_pair *, int, struct daemon_conf *); ++ int (*parser)(const struct nv_pair *, int, struct daemon_conf *); + int max_options; + }; + +@@ -727,7 +727,7 @@ static int qos_parser(const struct nv_pair *nv, int line, + return 0; + } + +-static int dispatch_parser(const const struct nv_pair *nv, int line, ++static int dispatch_parser(const struct nv_pair *nv, int line, + struct daemon_conf *config) + { + audit_msg(LOG_DEBUG, "dispatch_parser called with: %s", nv->value); +-- +2.50.1 + -- Gitee