diff options
| author | Thomas Weißschuh <thomas.weissschuh@linutronix.de> | 2025-02-26 12:44:54 +0100 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2025-03-03 20:00:13 +0100 |
| commit | 4f65df6a58b3de5132f978305c5f807ec3803943 (patch) | |
| tree | f6dc6083be476340e5615e677709f564e6207456 | |
| parent | 97a88141241fcf3d1e54a120afefea04fbd1a484 (diff) | |
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
| -rw-r--r-- | tools/testing/selftests/vDSO/vdso_test_gettimeofday.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/vDSO/vdso_test_gettimeofday.c b/tools/testing/selftests/vDSO/vdso_test_gettimeofday.c index 636a56ccf8e4..9ce795b806f0 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" |
