[LTP] [RFC PATCH v2 1/1] lapi: Add sysinfo.h to fix build with older MUSL toolchain
Petr Vorel
petr.vorel@gmail.com
Thu May 11 21:31:37 CEST 2023
Hi all,
> diff --git a/testcases/kernel/syscalls/sysinfo/sysinfo01.c b/testcases/kernel/syscalls/sysinfo/sysinfo01.c
> index 2ea44a2be..a237345ef 100644
> --- a/testcases/kernel/syscalls/sysinfo/sysinfo01.c
> +++ b/testcases/kernel/syscalls/sysinfo/sysinfo01.c
> @@ -69,7 +69,7 @@
> #include <sys/types.h>
> #include <sys/stat.h>
> #include <sys/signal.h>
> -#include <sys/sysinfo.h>
> +#include "lapi/sysinfo.h"
NOTE: sysinfo0[1-3].c (and any new sysinfo test) will need to use
<sys/sysinfo.h> due sysinfo() signature in it (that's not in
<linux/sysinfo.h>).
Following fix would be needed for this patch. But as there is no
feedback, I don't even send v3.
Kind regards,
Petr
diff --git testcases/kernel/syscalls/sysinfo/sysinfo01.c
testcases/kernel/syscalls/sysinfo/sysinfo01.c
index a237345ef..2ea44a2be 100644
--- testcases/kernel/syscalls/sysinfo/sysinfo01.c
+++ testcases/kernel/syscalls/sysinfo/sysinfo01.c
@@ -69,7 +69,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/signal.h>
-#include "lapi/sysinfo.h"
+#include <sys/sysinfo.h>
#include "test.h"
diff --git testcases/kernel/syscalls/sysinfo/sysinfo02.c
testcases/kernel/syscalls/sysinfo/sysinfo02.c
index 61fa1ab75..7ad0e8bdc 100644
--- testcases/kernel/syscalls/sysinfo/sysinfo02.c
+++ testcases/kernel/syscalls/sysinfo/sysinfo02.c
@@ -65,7 +65,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/signal.h>
-#include "lapi/sysinfo.h"
+#include <sys/sysinfo.h>
#include <stdint.h>
#include "test.h"
diff --git testcases/kernel/syscalls/sysinfo/sysinfo03.c
testcases/kernel/syscalls/sysinfo/sysinfo03.c
index 0b6ffb49b..13b0de806 100644
--- testcases/kernel/syscalls/sysinfo/sysinfo03.c
+++ testcases/kernel/syscalls/sysinfo/sysinfo03.c
@@ -14,9 +14,9 @@
*/
#include "lapi/posix_clocks.h"
-#include "lapi/sched.h"
-#include "lapi/sysinfo.h"
+#include <sys/sysinfo.h>
#include "tst_test.h"
+#include "lapi/sched.h"
static int offsets[] = {
10,
More information about the ltp
mailing list