From 0e34107963e3d503ed4dd7a9b9dc6b75596d5474 Mon Sep 17 00:00:00 2001 From: Oskari Rauta Date: Sat, 27 May 2023 10:05:20 +0300 Subject: [PATCH] apparmor: gcc 13 compatibility fix when built with gcc 13, fixes following error: capability.h:46:6: error: variable or field '__debug_capabilities' declared void 46 | void __debug_capabilities(uint64_t capset, const char *name); | ^~~~~~~~~~~~~~~~~~~~ capability.h:46:27: error: 'uint64_t' was not declared in this scope patch is back ported from upstream patch at https://gitlab.com/apparmor/apparmor/-/commit/64a64be7ffb5a84f27daa9f37ae8ad92800943d3.patch Signed-off-by: Oskari Rauta --- utils/apparmor/Makefile | 2 +- .../100-add-missing-cstdint-include.patch | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 utils/apparmor/patches/100-add-missing-cstdint-include.patch diff --git a/utils/apparmor/Makefile b/utils/apparmor/Makefile index f812d2a2e3..9dc83c956e 100644 --- a/utils/apparmor/Makefile +++ b/utils/apparmor/Makefile @@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=apparmor PKG_VERSION:=3.0.3 -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://gitlab.com/apparmor/apparmor/-/archive/v$(PKG_VERSION) diff --git a/utils/apparmor/patches/100-add-missing-cstdint-include.patch b/utils/apparmor/patches/100-add-missing-cstdint-include.patch new file mode 100644 index 0000000000..ff60ee2713 --- /dev/null +++ b/utils/apparmor/patches/100-add-missing-cstdint-include.patch @@ -0,0 +1,32 @@ +From 64a64be7ffb5a84f27daa9f37ae8ad92800943d3 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Mon, 23 May 2022 23:12:31 +0100 +Subject: [PATCH] parser/capability.h: add missing include + +Without the change apparmor build fails on this week's gcc-13 snapshot as: + + capability.h:66:6: error: variable or field '__debug_capabilities' declared void + 66 | void __debug_capabilities(uint64_t capset, const char *name); + | ^~~~~~~~~~~~~~~~~~~~ + capability.h:66:27: error: 'uint64_t' was not declared in this scope + 66 | void __debug_capabilities(uint64_t capset, const char *name); + | ^~~~~~~~ + capability.h:23:1: note: 'uint64_t' is defined in header ''; did you forget to '#include '? + 22 | #include + +++ |+#include + 23 | +--- + parser/capability.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/parser/capability.h ++++ b/parser/capability.h +@@ -19,6 +19,8 @@ + #ifndef __AA_CAPABILITY_H + #define __AA_CAPABILITY_H + ++#include ++ + #define NO_BACKMAP_CAP 0xff + + #ifndef CAP_PERFMON