mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Seiderer <ps.report@gmx.net>
To: linux-kselftest@vger.kernel.org
Cc: Shuah Khan <shuah@kernel.org>,
	linux-kernel@vger.kernel.org,
	Christian Brauner <brauner@kernel.org>,
	Peter Seiderer <ps.report@gmx.net>
Subject: [PATCH v1 3/3] selftests: pid_namespace: add missing sys/mount.h include in pid_max.c
Date: Wed, 15 Jan 2025 11:52:11 +0100	[thread overview]
Message-ID: <20250115105211.390370-3-ps.report@gmx.net> (raw)
In-Reply-To: <20250115105211.390370-1-ps.report@gmx.net>

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);
        |               ^~~~~

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 tools/testing/selftests/pid_namespace/pid_max.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/pid_namespace/pid_max.c b/tools/testing/selftests/pid_namespace/pid_max.c
index 51c414faabb0..96f274f0582b 100644
--- a/tools/testing/selftests/pid_namespace/pid_max.c
+++ b/tools/testing/selftests/pid_namespace/pid_max.c
@@ -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"
-- 
2.47.1


  parent reply	other threads:[~2025-01-15 10:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-15 10:52 [PATCH v1 1/3] selftests: pidfd: add missing sys/mount.h include in pidfd_fdinfo_test.c Peter Seiderer
2025-01-15 10:52 ` [PATCH v1 2/3] selftests: pidfd: add missing sys/ioctl.h include in pidfd_setns_test.c Peter Seiderer
2025-04-30 16:20   ` T.J. Mercier
2025-01-15 10:52 ` Peter Seiderer [this message]
2025-04-09 16:16   ` [PATCH v1 3/3] selftests: pid_namespace: add missing sys/mount.h include in pid_max.c T.J. Mercier
2025-04-30 16:20 ` [PATCH v1 1/3] selftests: pidfd: add missing sys/mount.h include in pidfd_fdinfo_test.c T.J. Mercier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250115105211.390370-3-ps.report@gmx.net \
    --to=ps.report@gmx.net \
    --cc=brauner@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®