The following commit has been merged into the timers/vdso branch of tip:
Commit-ID: 4f65df6a58b3de5132f978305c5f807ec3803943
Gitweb: https://git.kernel.org/tip/4f65df6a58b3de5132f978305c5f807ec3803943
Author: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
AuthorDate: Wed, 26 Feb 2025 12:44:54 +01:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Mon, 03 Mar 2025 20:00:13 +01:00
selftests: vDSO: vdso_test_gettimeofday: Make compatible with nolibc
nolibc does not provide sys/time.h and sys/auxv.h,
instead their definitions are available unconditionally.
Guard the includes so they are not attempted on nolibc.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/all/20250226-parse_vdso-nolibc-v2-15-28e14e031ed8@linutronix.de
---
tools/testing/selftests/vDSO/vdso_test_gettimeofday.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/vDSO/vdso_test_gettimeofday.c b/tools/testing/selftests/vDSO/vdso_test_gettimeofday.c
index 636a56c..9ce795b 100644
--- a/tools/testing/selftests/vDSO/vdso_test_gettimeofday.c
+++ b/tools/testing/selftests/vDSO/vdso_test_gettimeofday.c
@@ -11,8 +11,10 @@
*/
#include <stdio.h>
+#ifndef NOLIBC
#include <sys/auxv.h>
#include <sys/time.h>
+#endif
#include "../kselftest.h"
#include "parse_vdso.h"