[LTP] [PATCH v2 2/3] fanotify: Fix build on undefined struct file_handle
Petr Vorel
pvorel@suse.cz
Wed Jan 13 08:51:09 CET 2021
This fixes error:
fanotify09.c:201:32: error: dereferencing pointer to incomplete type ‘struct file_handle’
201 | filename = (char *)file_handle->f_handle + file_handle->handle_bytes;
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/kernel/syscalls/fanotify/fanotify.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/kernel/syscalls/fanotify/fanotify.h b/testcases/kernel/syscalls/fanotify/fanotify.h
index 8907db052..039379961 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify.h
+++ b/testcases/kernel/syscalls/fanotify/fanotify.h
@@ -12,8 +12,8 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
-#include <fcntl.h>
#include <sys/fanotify.h>
+#include "lapi/fcntl.h"
int safe_fanotify_init(const char *file, const int lineno,
unsigned int flags, unsigned int event_f_flags)
--
2.29.2
More information about the ltp
mailing list