selftests: vDSO: Explicitly include sched.h
Subsystems (2)
PATCH v2 1/1 selftests: vDSO: Explicitly include sched.h
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.
---
Changes in v2:
- Include <sched.h> instead of <linux/sched.h>
v1: https://lore.kernel.org/all/[email protected]/
tools/testing/selftests/vDSO/vdso_test_getrandom.c | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/vDSO/vdso_test_getrandom.c +1 -0
@@ -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>
Signature · 1 line
2.33.0
Shuah Khan
maintainerQuoted 22 lines · Yu Liao
The previous commit introduced the use of
CLONE_NEWTIMEwithout including <sched.h> which contains its definition.Add an explicit include of <
sched.h> to ensure thatCLONE_NEWTIMEis correctly defined before it is used.Fixes 2aec90036dcd ("selftests: vDSO: ensure vgetrandom works in a time namespace")Signed-off-by Yu Liao <[email protected]>---
Changes in v2:
- Include <sched.h> instead of <linux/sched.h>v1: https://lore.kernel.org/all/[email protected]/
tools/testing/selftests/vDSO/vdso_test_getrandom.c | 1 + 1 file changed, 1 insertion(+)tools/testing/selftests/vDSO/vdso_test_getrandom.c +0
-0
tools/testing/selftests/vDSO/vdso_test_getrandom.c line 17
Quoted 7 lines
tools/testing/selftests/vDSO/vdso_test_getrandom.c +1
-0@@ -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>
Thank you. Applied to linux-kselftest fixes for next rc.
thanks,
-- Shuah