[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250411-nolibc-kselftest-harness-v3-13-4d9c0295893f@linutronix.de>
Date: Fri, 11 Apr 2025 11:00:37 +0200
From: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
To: Shuah Khan <shuah@...nel.org>, Shuah Khan <skhan@...uxfoundation.org>,
Willy Tarreau <w@....eu>,
Thomas Weißschuh <linux@...ssschuh.net>,
Kees Cook <kees@...nel.org>
Cc: Andy Lutomirski <luto@...capital.net>, Will Drewry <wad@...omium.org>,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Subject: [PATCH v3 13/32] selftests: harness: Guard includes on nolibc
Nolibc doesn't provide all normal header files.
Don't try to include these non-existent header files, as the symbols are
available unconditionally anyways.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
---
tools/testing/selftests/kselftest_harness.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h
index 1e584f39a42023c400988dea96f0274d4dc3645b..4247c67b3060fbe9d224c1171f3ec998ae6b1080 100644
--- a/tools/testing/selftests/kselftest_harness.h
+++ b/tools/testing/selftests/kselftest_harness.h
@@ -57,16 +57,19 @@
#include <ctype.h>
#include <errno.h>
#include <linux/unistd.h>
-#include <poll.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
+
+#ifndef NOLIBC
+#include <poll.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/wait.h>
-#include <unistd.h>
+#endif
#include "kselftest.h"
--
2.49.0
Powered by blists - more mailing lists