diff mbox series

selftests: pid_namespace: Fix missing mount headers in pid_max.c

Message ID 20250506154416.3102-1-moonhee.lee.ca@gmail.com
State Superseded
Headers show
Series selftests: pid_namespace: Fix missing mount headers in pid_max.c | expand

Commit Message

Moon Hee Lee May 6, 2025, 3:44 p.m. UTC
Fix compilation error in pid_max.c by including <sys/mount.h> to define
mount(), umount2(), MS_PRIVATE, MS_REC, and MNT_DETACH.

The test now builds successfully.

Signed-off-by: Moon Hee Lee <moonhee.lee.ca@gmail.com>
---
 tools/testing/selftests/pid_namespace/pid_max.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/tools/testing/selftests/pid_namespace/pid_max.c b/tools/testing/selftests/pid_namespace/pid_max.c
index 51c414faabb0..972bedc475f1 100644
--- a/tools/testing/selftests/pid_namespace/pid_max.c
+++ b/tools/testing/selftests/pid_namespace/pid_max.c
@@ -11,6 +11,7 @@ 
 #include <string.h>
 #include <syscall.h>
 #include <sys/wait.h>
+#include <sys/mount.h>
 
 #include "../kselftest_harness.h"
 #include "../pidfd/pidfd.h"