wok-next view audit/stuff/patches/audit-auvirt-get-inline-functions-work-with-C99.patch @ rev 20678

Up clisp (2.50)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue May 15 02:59:03 2018 +0300 (2018-05-15)
parents
children
line source
1 From 15036dd4fa9eb209f5e148c6f7ee081f5ca78fa4 Mon Sep 17 00:00:00 2001
2 From: Wenzong Fan <wenzong.fan at windriver.com>
3 Date: Fri, 11 Sep 2015 03:37:13 -0400
4 Subject: [PATCH] audit/auvirt: get inline functions work with C99
6 This fixes link errors:
8 auvirt.c:484: undefined reference to `copy_str'
9 auvirt.c:667: undefined reference to `is_resource'
11 As gcc5 doc about "Different semantics for inline functions":
13 > C99 extern inline: An externally visible function is generated; \
14 > same as GNU89 inline.
16 > To fix this, either mark the function foo as extern, or add the \
17 > following declaration: extern inline int foo (void);
19 (from https://gcc.gnu.org/gcc-5/porting_to.html)
21 Upstream Status: pending
23 Signed-off-by: Wenzong Fan <wenzong.fan at windriver.com>
24 ---
25 tools/auvirt/auvirt.c | 4 ++--
26 1 file changed, 2 insertions(+), 2 deletions(-)
28 diff --git a/tools/auvirt/auvirt.c b/tools/auvirt/auvirt.c
29 index 655c454..b16d718 100644
30 --- a/tools/auvirt/auvirt.c
31 +++ b/tools/auvirt/auvirt.c
32 @@ -138,7 +138,7 @@ void event_free(struct event *event)
33 }
34 }
36 -inline char *copy_str(const char *str)
37 +extern inline char *copy_str(const char *str)
38 {
39 return (str) ? strdup(str) : NULL;
40 }
41 @@ -650,7 +650,7 @@ int process_control_event(auparse_state_t *au)
42 return 0;
43 }
45 -inline int is_resource(const char *res)
46 +extern inline int is_resource(const char *res)
47 {
48 if (res == NULL ||
49 res[0] == '\0' ||
50 --
51 1.9.1