Skip to content

Commit 4f65df6

Browse files
t-8chKAGA-KOKO
authored andcommitted
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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Vincenzo Frascino <[email protected]> Acked-by: Shuah Khan <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent 97a8814 commit 4f65df6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/testing/selftests/vDSO/vdso_test_gettimeofday.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111
*/
1212

1313
#include <stdio.h>
14+
#ifndef NOLIBC
1415
#include <sys/auxv.h>
1516
#include <sys/time.h>
17+
#endif
1618

1719
#include "../kselftest.h"
1820
#include "parse_vdso.h"

0 commit comments

Comments
 (0)