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
This commit is contained in:
Thomas Weißschuh
2025-02-26 12:44:54 +01:00
committed by Thomas Gleixner
parent 97a8814124
commit 4f65df6a58

View File

@@ -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"