[PATCH 03/13] selftests/filesystems: fclog: Fix build errors seen with -Werror

Guenter Roeck <[email protected]> Thu, 4 Dec 2025 08:17:17 -0800
Newsgroups gmane.linux.network,gmane.linux.kernel,gmane.comp.emulators.wine.devel,gmane.linux.kernel.bpf
Message-ID <[email protected]>
Fix

fclog.c:37:21: error: call to undeclared function 'open'
fclog.c:37:47: error: use of undeclared identifier 'O_RDONLY'; did you mean 'MS_RDONLY'?
fclog.c:37:56: error: use of undeclared identifier 'O_CLOEXEC'

by adding the missing include file.

Fixes: df579e471111b ("selftests/filesystems: add basic fscontext log tests")
Cc: Aleksa Sarai <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
---
 tools/testing/selftests/filesystems/fclog.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/filesystems/fclog.c b/tools/testing/selftests/filesystems/fclog.c
index 912a8b755c3b..d7cc3aaa8672 100644
--- a/tools/testing/selftests/filesystems/fclog.c
+++ b/tools/testing/selftests/filesystems/fclog.c
@@ -6,6 +6,7 @@
 
 #include <assert.h>
 #include <errno.h>
+#include <fcntl.h>
 #include <sched.h>
 #include <stdio.h>
 #include <stdlib.h>
-- 
2.43.0