mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] selftests: proc: include fcntl.h in proc-pidns
@ 2026-06-18 15:14 Amin Vakil
  2026-06-18 15:24 ` Shuah Khan
  2026-06-23 10:13 ` Christian Brauner
  0 siblings, 2 replies; 5+ messages in thread
From: Amin Vakil @ 2026-06-18 15:14 UTC (permalink / raw)
  To: Shuah Khan
  Cc: Aleksa Sarai, Christian Brauner, linux-kselftest, linux-fsdevel,
	linux-kernel, Amin Vakil

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.

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>
-- 
2.54.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-06-29 14:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-18 15:14 [PATCH] selftests: proc: include fcntl.h in proc-pidns Amin Vakil
2026-06-18 15:24 ` Shuah Khan
2026-06-18 16:12   ` Amin Vakil
2026-06-23 10:13 ` Christian Brauner
2026-06-29 14:47   ` Amin Vakil

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®