]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selftests: vDSO: vdso_test_gettimeofday: Make compatible with nolibc
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Wed, 26 Feb 2025 11:44:54 +0000 (12:44 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 3 Mar 2025 19:00:13 +0000 (20:00 +0100)
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

index 636a56ccf8e4e7943ca446fe3fad6897598ca77f..9ce795b806f0992b83cef78c7e16fac0e54750da 100644 (file)
  */
 
 #include <stdio.h>
+#ifndef NOLIBC
 #include <sys/auxv.h>
 #include <sys/time.h>
+#endif
 
 #include "../kselftest.h"
 #include "parse_vdso.h"