[PATCH v2 03/13] selftests/filesystems: fclog: Fix build warnings and errors
Guenter Roeck <[email protected]> Fri, 5 Dec 2025 09:09:57 -0800
| Newsgroups | gmane.linux.kernel.bpf,gmane.linux.kernel,gmane.comp.emulators.wine.devel,gmane.linux.network |
|---|---|
| Message-ID | <[email protected]> |
Fix
fclog.c:37:21: warning: 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 including fcntl.h.
Fixes: df579e471111b ("selftests/filesystems: add basic fscontext log tests")
Cc: Aleksa Sarai <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
---
v2: Update subject and description to reflect that the patch also fixes
build warnings.
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.45.2