From 6274061e82de11afb676f54eb3f032aadc2508e7 Mon Sep 17 00:00:00 2001 From: Ren Bo Date: Wed, 17 Jan 2024 10:21:18 +0800 Subject: [PATCH] Split audit-3.0.8-flex-array-workaround.patch Signed-off-by: Ren Bo --- 1000-split-audit-3.0.8-flex-array-workaround.patch | 13 +++++++++++++ audit.spec | 5 +++++ 2 files changed, 18 insertions(+) create mode 100644 1000-split-audit-3.0.8-flex-array-workaround.patch diff --git a/1000-split-audit-3.0.8-flex-array-workaround.patch b/1000-split-audit-3.0.8-flex-array-workaround.patch new file mode 100644 index 0000000..1814a81 --- /dev/null +++ b/1000-split-audit-3.0.8-flex-array-workaround.patch @@ -0,0 +1,13 @@ +diff --git a/lib/audit.h b/lib/audit.h +index 51d7f2b..b2f306d 100644 +--- a/lib/audit.h ++++ b/lib/audit.h +@@ -514,7 +514,7 @@ struct audit_rule_data { + __u32 values[AUDIT_MAX_FIELDS]; + __u32 fieldflags[AUDIT_MAX_FIELDS]; + __u32 buflen; /* total length of string fields */ +- char buf[]; /* string fields buffer */ ++ char buf[0]; /* string fields buffer */ + }; + + #endif /* _LINUX_AUDIT_H_ */ diff --git a/audit.spec b/audit.spec index 251a66b..213c49c 100644 --- a/audit.spec +++ b/audit.spec @@ -15,6 +15,7 @@ Patch2: audit-3.0.8-drop-protecthome.patch Patch3: audit-3.1-fanotify-records.patch Patch4: audit-3.0.8-flex-array-workaround.patch Patch5: audit-3.0.8-undo-flex-array.patch +Patch1000: 1000-split-audit-3.0.8-flex-array-workaround.patch BuildRequires: gcc swig make BuildRequires: openldap-devel @@ -111,6 +112,9 @@ cp /usr/include/linux/audit.h lib/ %patch -P 2 -p1 %patch -P 3 -p1 %patch -P 4 -p1 +%ifnarch loongarch64 +%patch -P 1000 -p1 +%endif %build %configure --with-python=no \ @@ -275,6 +279,7 @@ fi * Mon Dec 25 2023 Zhao Hang - 3.0.7-5.0.1 - Remove unneeded modification - Add doc sub package (Bo Ren) +- Split audit-3.0.8-flex-array-workaround.patch (Bo Ren) * Thu Jun 22 2023 Radovan Sroka - 3.0.7-5 - Introduce new fanotify record fields -- Gitee