From: Shuah Khan <skhan@linuxfoundation.org>
To: Amin Vakil <info@aminvakil.com>, Shuah Khan <shuah@kernel.org>
Cc: Aleksa Sarai <cyphar@cyphar.com>,
Christian Brauner <brauner@kernel.org>,
linux-kselftest@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] selftests: proc: include fcntl.h in proc-pidns
Date: Thu, 18 Jun 2026 09:24:55 -0600 [thread overview]
Message-ID: <16ef9ff1-4c98-4c89-aefa-734a9e775df2@linuxfoundation.org> (raw)
In-Reply-To: <20260618151444.124739-1-info@aminvakil.com>
On 6/18/26 09:14, Amin Vakil wrote:
> proc-pidns.c uses open() and O_* flags, but does not include
> <fcntl.h>. This breaks the proc selftests build with errors such as:
>
> error: implicit declaration of function 'open'
> error: 'O_WRONLY' undeclared
> error: 'O_CREAT' undeclared
> error: 'O_RDONLY' undeclared
>
> Include <fcntl.h> to provide the declaration and flag definitions.
Did you install headers before compiling the test?
>
> Fixes: 5554d820f71c ("selftests/proc: add tests for new pidns APIs")
> Tested with:
> make -C tools/testing/selftests TARGETS=proc
>
> Signed-off-by: Amin Vakil <info@aminvakil.com>
> ---
> tools/testing/selftests/proc/proc-pidns.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/testing/selftests/proc/proc-pidns.c b/tools/testing/selftests/proc/proc-pidns.c
> index 25b9a2933c45..6f7c10fe97b3 100644
> --- a/tools/testing/selftests/proc/proc-pidns.c
> +++ b/tools/testing/selftests/proc/proc-pidns.c
> @@ -6,6 +6,7 @@
>
> #include <assert.h>
> #include <errno.h>
> +#include <fcntl.h>
> #include <sched.h>
> #include <stdbool.h>
> #include <stdlib.h>
thanks,
-- Shuah
next prev parent reply other threads:[~2026-06-18 15:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-18 15:14 Amin Vakil
2026-06-18 15:24 ` Shuah Khan [this message]
2026-06-18 16:12 ` Amin Vakil
2026-06-23 10:13 ` Christian Brauner
2026-06-29 14:47 ` Amin Vakil
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=16ef9ff1-4c98-4c89-aefa-734a9e775df2@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=brauner@kernel.org \
--cc=cyphar@cyphar.com \
--cc=info@aminvakil.com \
--cc=linux-fsdevel@vger.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®