36 lines
1.3 KiB
Diff
36 lines
1.3 KiB
Diff
From f3b0ac316eb5c9a8419020ad47a71bda3f3b2dea Mon Sep 17 00:00:00 2001
|
||
From: David Disseldorp <ddiss@suse.de>
|
||
Date: Thu, 26 Jun 2025 17:24:32 +1000
|
||
Subject: [PATCH] lkl: hijack: explicitly build with -std=gnu11
|
||
MIME-Version: 1.0
|
||
Content-Type: text/plain; charset=UTF-8
|
||
Content-Transfer-Encoding: 8bit
|
||
|
||
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>
|
||
---
|
||
tools/lkl/lib/hijack/Build | 3 +++
|
||
1 file changed, 3 insertions(+)
|
||
|
||
diff --git a/tools/lkl/lib/hijack/Build b/tools/lkl/lib/hijack/Build
|
||
index eb9872ae5c29e..b42239e47d8e7 100644
|
||
--- a/tools/lkl/lib/hijack/Build
|
||
+++ b/tools/lkl/lib/hijack/Build
|
||
@@ -9,3 +9,6 @@ liblkl-zpoline-y += hijack.o
|
||
liblkl-zpoline-y += init.o
|
||
liblkl-zpoline-y += xlate.o
|
||
liblkl-zpoline-y += dbg_handler.o
|
||
+
|
||
+# -std=gnu23/c23 fails due to HOST_CALL (*host_##name)()
|
||
+CFLAGS_hijack.o += -std=gnu11
|
||
--
|
||
2.43.0
|
||
|