Re: [PATCH v1 1/3] selftests: pidfd: add missing sys/mount.h include in pidfd_fdinfo_test.c

From: Peter Seiderer
Date: Fri Jan 17 2025 - 09:20:48 EST


Please ignore this e-mail (re-send by mistake of [1])..., sorry for the noise...

Regards,
Peter

[1] https://lore.kernel.org/linux-kselftest/20250115105211.390370-1-ps.report@xxxxxxx/


On Fri, 17 Jan 2025 15:14:48 +0100, Peter Seiderer <ps.report@xxxxxxx> wrote:

> Fix compile on openSUSE Tumbleweed (gcc-14.2.1, glibc-2.40):
> - add missing sys/mount.h include
>
> Fixes:
>
> pidfd_fdinfo_test.c: In function ‘child_fdinfo_nspid_test’:
> pidfd_fdinfo_test.c:230:13: error: implicit declaration of function ‘mount’ [-Wimplicit-function-declaration]
> 230 | r = mount(NULL, "/", NULL, MS_REC | MS_PRIVATE, 0);
> | ^~~~~
>
> Signed-off-by: Peter Seiderer <ps.report@xxxxxxx>
> ---
> tools/testing/selftests/pidfd/pidfd_fdinfo_test.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/testing/selftests/pidfd/pidfd_fdinfo_test.c b/tools/testing/selftests/pidfd/pidfd_fdinfo_test.c
> index f062a986e382..f718aac75068 100644
> --- a/tools/testing/selftests/pidfd/pidfd_fdinfo_test.c
> +++ b/tools/testing/selftests/pidfd/pidfd_fdinfo_test.c
> @@ -13,6 +13,7 @@
> #include <syscall.h>
> #include <sys/wait.h>
> #include <sys/mman.h>
> +#include <sys/mount.h>
>
> #include "pidfd.h"
> #include "../kselftest.h"