selftests/pidfd: Fix missing headers
cover selftests/pidfd: Fix missing headers
Fix compilation errors caused by missing headers in the pidfd selftest.
The errors include:
pidfd_fdinfo_test.c:230:13: error: implicit declaration of function ‘mount’ pidfd_setns_test.c:172:54: error: implicit declaration of function ‘ioctl’
Siddharth Menon (2):
selftests/pidfd: Fix missing header
selftests/pidfd: Fix missing header
tools/testing/selftests/pidfd/pidfd_fdinfo_test.c | 1 + tools/testing/selftests/pidfd/pidfd_setns_test.c | 1 + 2 files changed, 2 insertions(+)
Signature · 1 line
2.48.1
PATCH 1/2 selftests/pidfd: Fix missing header
Fix compilation errors caused by the missing sys/mount.h header
--- tools/testing/selftests/pidfd/pidfd_fdinfo_test.c | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/pidfd/pidfd_fdinfo_test.c +1 -0
@@ -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"
Signature · 1 line
2.48.1
PATCH 2/2 selftests/pidfd: Fix missing header
In reply to Siddharth MenonFix compilation errors caused by the missing sys/ioctl.h header
--- tools/testing/selftests/pidfd/pidfd_setns_test.c | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/pidfd/pidfd_setns_test.c +1 -0
@@ -17,6 +17,7 @@#include <sys/socket.h> #include <sys/stat.h> #include <linux/ioctl.h> +#include <sys/ioctl.h> #include "pidfd.h" #include "../kselftest_harness.h"
Signature · 1 line
2.48.1
Hello Siddharth,
Quoted 6 lines · Siddharth Menon
Fix compilation errors caused by missing headers in the pidfd selftest.
The errors include:
pidfd_fdinfo_test.c:230:13: error: implicit declaration of function ‘mount’ pidfd_setns_test.c:172:54: error: implicit declaration of function ‘ioctl’
Quoted 8 lines
Siddharth Menon (2):
selftests/pidfd: Fix missing header
selftests/pidfd: Fix missing headertools/testing/selftests/pidfd/pidfd_fdinfo_test.c | 1 + tools/testing/selftests/pidfd/pidfd_setns_test.c | 1 + 2 files changed, 2 insertions(+)
Predated patches already available, see
https://lore.kernel.org/linux-kselftest/[email protected]/ https://lore.kernel.org/linux-kselftest/[email protected]/ https://lore.kernel.org/linux-kselftest/[email protected]/
Regards,
Peter