selftests/filesystems: include <fcntl.h> in wrappers.h
PATCH 1/1 selftests/filesystems: include <fcntl.h> in wrappers.h
openat_o_mkdir() in wrappers.h uses O_DIRECTORY, O_CREAT and O_EXCL, but the header doesn't include <fcntl.h>. fscontext_ns_test.c doesn't either, so it no longer builds:
../wrappers.h:116:32: error: 'O_DIRECTORY' undeclared
Include it in the header.
Fixes b536a4aa16ea ("selftest: add tests for open*(O_CREAT|O_DIRECTORY)")
Reported-by kernelci.org bot <[email protected]>
Reported-by kernel test robot <[email protected]>
Signed-off-by Sasha Levin <[email protected]>
---
Every selftest that includes wrappers.h builds with this, gcc and clang on x86_64.
tools/testing/selftests/filesystems/wrappers.h | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/filesystems/wrappers.h +1 -0
@@ -5,6 +5,7 @@#define _GNU_SOURCE +#include <fcntl.h> #include <linux/types.h> #include <linux/mount.h> #include <sys/syscall.h>
base-commit: 13419eff849a88a276dec97fa62a532dc7fff400
Signature · 1 line
2.53.0