Skip to contentSkip to conversation

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

PATCH Superseded Moon Hee Lee 1 participant 1 message May 6, 2025

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests: pid_namespace: Fix missing mount headers in pid_max.c

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.

---
 tools/testing/selftests/pid_namespace/pid_max.c | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/pid_namespace/pid_max.c +1 -0
index 51c414faabb0..972bedc475f1 100644
@@ -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"
Signature · 1 line
2.43.0