diff mbox series

[v2,2/3] fanotify: Fix build on undefined struct file_handle

Message ID 20210113075110.31628-3-pvorel@suse.cz
State Accepted
Headers show
Series [v2,1/3] lapi: Move struct file_handle into lapi/fcntl.h | expand

Commit Message

Petr Vorel Jan. 13, 2021, 7:51 a.m. UTC
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 mbox series

Patch

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)