selftests: vDSO: Explicitly include sched.h
authorYu Liao <liaoyu15@huawei.com>
Tue, 8 Oct 2024 02:33:32 +0000 (10:33 +0800)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 8 Oct 2024 21:48:09 +0000 (15:48 -0600)
The previous commit introduced the use of CLONE_NEWTIME without including
<sched.h> which contains its definition.

Add an explicit include of <sched.h> to ensure that CLONE_NEWTIME
is correctly defined before it is used.

Fixes: 2aec90036dcd ("selftests: vDSO: ensure vgetrandom works in a time namespace")
Signed-off-by: Yu Liao <liaoyu15@huawei.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/vDSO/vdso_test_getrandom.c

index da1210c..95057f7 100644 (file)
@@ -11,6 +11,7 @@
 #include <string.h>
 #include <time.h>
 #include <unistd.h>
+#include <sched.h>
 #include <signal.h>
 #include <sys/auxv.h>
 #include <sys/mman.h>