diff mbox series

selftests/vDSO: Fix undefined CLONE_NEWTIME by including

Message ID 20250126105932.63762-1-purvayeshi550@gmail.com (mailing list archive)
State New
Headers show
Series selftests/vDSO: Fix undefined CLONE_NEWTIME by including | expand

Commit Message

Purva Yeshi Jan. 26, 2025, 10:59 a.m. UTC
Fix the build failure caused by the undefined `CLONE_NEWTIME`.  
Include the `linux/sched.h` header file where the function is defined to 
ensure successful compilation of the selftests.

Signed-off-by: Purva Yeshi <purvayeshi550@gmail.com>
---
 tools/testing/selftests/vDSO/vdso_test_getrandom.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Christophe Leroy Jan. 27, 2025, 8:02 a.m. UTC | #1
Le 26/01/2025 à 11:59, Purva Yeshi a écrit :
> [Vous ne recevez pas souvent de courriers de purvayeshi550@gmail.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ]
> 
> Fix the build failure caused by the undefined `CLONE_NEWTIME`.
> Include the `linux/sched.h` header file where the function is defined to
> ensure successful compilation of the selftests.

This is supposed to be already fixed by commit 34d5b600172b ("selftests: 
vDSO: Explicitly include sched.h")

Can you explain what is the exact problem still ? And why linux/sched.h ?

Did you properly build kernel headers before building selftests ?


> 
> Signed-off-by: Purva Yeshi <purvayeshi550@gmail.com>
> ---
>   tools/testing/selftests/vDSO/vdso_test_getrandom.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/tools/testing/selftests/vDSO/vdso_test_getrandom.c b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
> index 95057f7567db..b2c9cf15878b 100644
> --- a/tools/testing/selftests/vDSO/vdso_test_getrandom.c
> +++ b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
> @@ -29,6 +29,8 @@
>   #include "vdso_config.h"
>   #include "vdso_call.h"
> 
> +#include <linux/sched.h>
> +
>   #ifndef timespecsub
>   #define        timespecsub(tsp, usp, vsp)                                      \
>          do {                                                            \
> --
> 2.34.1
>
diff mbox series

Patch

diff --git a/tools/testing/selftests/vDSO/vdso_test_getrandom.c b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
index 95057f7567db..b2c9cf15878b 100644
--- a/tools/testing/selftests/vDSO/vdso_test_getrandom.c
+++ b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
@@ -29,6 +29,8 @@ 
 #include "vdso_config.h"
 #include "vdso_call.h"
 
+#include <linux/sched.h>
+
 #ifndef timespecsub
 #define	timespecsub(tsp, usp, vsp)					\
 	do {								\