Skip to content

Commit bd30a15

Browse files
committed
lkl: hijack: explicitly build with -std=gnu11
HOST_CALL() uses a (*host_##name)() function pointer while callers provide regular syscall parameters. With gcc -std=gnu23 this results in: lib/hijack/hijack.c: In function ‘hijack_setsockopt’: lib/hijack/hijack.c:176:24: error: too many arguments to function ‘host_setsockopt’; expected 0, have 5 176 | return host_setsockopt(fd, level, optname, optval, optlen); | ^~~~~~~~~~~~~~~ ~~ Signed-off-by: David Disseldorp <ddiss@suse.de>
1 parent 2f1311c commit bd30a15

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • tools/lkl/lib/hijack

tools/lkl/lib/hijack/Build

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ liblkl-zpoline-y += hijack.o
99
liblkl-zpoline-y += init.o
1010
liblkl-zpoline-y += xlate.o
1111
liblkl-zpoline-y += dbg_handler.o
12+
13+
# -std=gnu23/c23 fails due to HOST_CALL (*host_##name)()
14+
CFLAGS_hijack.o += -std=gnu11

0 commit comments

Comments
 (0)