From: I Hsin Cheng <richard120310@gmail.com>
To: shuah@kernel.org
Cc: brauner@kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org,
linux-kernel-mentees@lists.linux.dev,
I Hsin Cheng <richard120310@gmail.com>
Subject: [PATCH] selftests: pidfd: Fix compiling warning of pidfs_setns
Date: Wed, 5 Feb 2025 13:50:31 +0800 [thread overview]
Message-ID: <20250205055031.259710-1-richard120310@gmail.com> (raw)
In the compilation of pidfs_setns_test.c , a warning as the following
will pop out.
pidfd_setns_test.c: In function ‘current_nsset_setup’:
pidfd_setns_test.c:173:54: warning: implicit declaration of function \
‘ioctl’ [-Wimplicit-function-declaration]
173 | self->child_pidfd_derived_nsfds[i] = \
ioctl(self->pidfd, info->pidfd_ioctl, 0);
It's caused by wrong import of header file <linux/ioctl.h>, fix it to
<sys/ioctl.h>.
Signed-off-by: I Hsin Cheng <richard120310@gmail.com>
---
tools/testing/selftests/pidfd/pidfd_setns_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/pidfd/pidfd_setns_test.c b/tools/testing/selftests/pidfd/pidfd_setns_test.c
index 7c2a43491..3ed42f1eb 100644
--- a/tools/testing/selftests/pidfd/pidfd_setns_test.c
+++ b/tools/testing/selftests/pidfd/pidfd_setns_test.c
@@ -16,7 +16,7 @@
#include <unistd.h>
#include <sys/socket.h>
#include <sys/stat.h>
-#include <linux/ioctl.h>
+#include <sys/ioctl.h>
#include "pidfd.h"
#include "../clone3/clone3_selftests.h"
--
2.43.0
next reply other threads:[~2025-02-05 5:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-05 5:50 I Hsin Cheng [this message]
2025-02-05 12:09 ` [PATCH] selftests: pidfd: Fix compiling warning of pidfs_setns Peter Seiderer
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=20250205055031.259710-1-richard120310@gmail.com \
--to=richard120310@gmail.com \
--cc=brauner@kernel.org \
--cc=linux-kernel-mentees@lists.linux.dev \
--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