From 321a2c1dcbb779fac29b6530ecf8be3a6ad90912 Mon Sep 17 00:00:00 2001 From: Steve Beattie Date: Tue, 3 Mar 2015 23:32:26 -0800 Subject: [PATCH] regression tests: fix gcc-5 inline confusion Merge from trunk revision 2889 Parts of the regression tests that use the do_open() inline function from changehat.h fail to build under gcc-5 like so: cc -g -O0 -Wall -Wstrict-prototypes changeprofile.c -lapparmor -o changeprofile /tmp/ccT6GE6k.o: In function `main': /home/ubuntu/bzr/apparmor/tests/regression/apparmor/changeprofile.c:43: undefined reference to `do_open' collect2: error: ld returned 1 exit status : recipe for target 'changeprofile' failed This patch converts the do_open function declaration to be static inline, which apparently keeps gcc-5 from getting confused. Signed-off-by: Steve Beattie Acked-by: John Johansen --- tests/regression/apparmor/changehat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/regression/apparmor/changehat.h b/tests/regression/apparmor/changehat.h index b4c721c60..8a050e9b2 100644 --- a/tests/regression/apparmor/changehat.h +++ b/tests/regression/apparmor/changehat.h @@ -4,7 +4,7 @@ #define SD_ID_MAGIC 0x8c235e38 -inline int do_open (char * file) +static inline int do_open (char * file) { int fd, rc; char buf[128];