diff options
Diffstat (limited to 'testing/apparmor/0004-parser-provide-typedefs-for-comparison_fn_t-and-__fr.patch')
-rw-r--r-- | testing/apparmor/0004-parser-provide-typedefs-for-comparison_fn_t-and-__fr.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/testing/apparmor/0004-parser-provide-typedefs-for-comparison_fn_t-and-__fr.patch b/testing/apparmor/0004-parser-provide-typedefs-for-comparison_fn_t-and-__fr.patch new file mode 100644 index 0000000000..784fa52c77 --- /dev/null +++ b/testing/apparmor/0004-parser-provide-typedefs-for-comparison_fn_t-and-__fr.patch @@ -0,0 +1,53 @@ +From 2e32573574a01681b2b159016e77b0de21e9d70d Mon Sep 17 00:00:00 2001 +From: Patrick Steinhardt <ps@pks.im> +Date: Thu, 26 Apr 2018 14:54:05 +0100 +Subject: [PATCH 04/11] parser: provide typedefs for comparison_fn_t and + __free_fn_t + +The POSIX standard never defines the typedefs `comparison_fn_t` and +`__free_fn_t`, but they are provided by glibc and user in the parsing +code. Provide the typedefs ourselves to fix compiling on musl based +systems. + +(cherry picked from commit 655d3e782661aa756a53b45b2235205f88e1e0d0) + +Signed-off-by: Patrick Steinhardt <ps@pks.im> +Acked-by: John Johansen <john.johansen@canonical.com> +Acked-by: Steve Beattie <steve@nxnw.org> + +PR: https://gitlab.com/apparmor/apparmor/merge_requests/107 +--- + parser/parser_alias.c | 2 ++ + parser/parser_symtab.c | 3 +++ + 2 files changed, 5 insertions(+) + +diff --git a/parser/parser_alias.c b/parser/parser_alias.c +index f5b6da4e..b96d18f8 100644 +--- a/parser/parser_alias.c ++++ b/parser/parser_alias.c +@@ -25,6 +25,8 @@ + #include "parser.h" + #include "profile.h" + ++typedef int (*comparison_fn_t)(const void *, const void *); ++ + struct alias_rule { + char *from; + char *to; +diff --git a/parser/parser_symtab.c b/parser/parser_symtab.c +index 3e667d87..7b8f211b 100644 +--- a/parser/parser_symtab.c ++++ b/parser/parser_symtab.c +@@ -25,6 +25,9 @@ + #include "immunix.h" + #include "parser.h" + ++typedef int (*comparison_fn_t)(const void *, const void *); ++typedef void (*__free_fn_t)(void *); ++ + enum var_type { + sd_boolean, + sd_set, +-- +2.17.1 + |