Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Thomas Weißschuh and committed by
Thomas Gleixner
4f65df6a 97a88141

+2
+2
tools/testing/selftests/vDSO/vdso_test_gettimeofday.c
··· 11 11 */ 12 12 13 13 #include <stdio.h> 14 + #ifndef NOLIBC 14 15 #include <sys/auxv.h> 15 16 #include <sys/time.h> 17 + #endif 16 18 17 19 #include "../kselftest.h" 18 20 #include "parse_vdso.h"