selftests: pid_namespace: add missing sys/mount.h include in pid_max.c

Fix compile on openSUSE Tumbleweed (gcc-14.2.1, glibc-2.40):
  - add missing sys/mount.h include

Fixes:

  pid_max.c: In function ‘pid_max_cb’:
  pid_max.c:42:15: error: implicit declaration of function ‘mount’ [-Wimplicit-function-declaration]
     42 |         ret = mount("", "/", NULL, MS_PRIVATE | MS_REC, 0);
        |               ^~~~~

Link: https://lore.kernel.org/r/20250115105211.390370-3-ps.report@gmx.net
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: T.J. Mercier <tjmercier@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
This commit is contained in:
Peter Seiderer 2025-01-15 11:52:11 +01:00 committed by Shuah Khan
parent 23b88515a3
commit 11f6dcf784
1 changed files with 1 additions and 0 deletions

View File

@ -10,6 +10,7 @@
#include <stdlib.h>
#include <string.h>
#include <syscall.h>
#include <sys/mount.h>
#include <sys/wait.h>
#include "../kselftest_harness.h"