diff options
author | Petr Vorel <pvorel@suse.cz> | 2020-05-14 11:16:48 +0200 |
---|---|---|
committer | Petr Vorel <pvorel@suse.cz> | 2020-05-14 11:40:28 +0200 |
commit | 716b320b47bbbb9d0572485b67e71801bac4efa3 (patch) | |
tree | 2229159515f0a6d0588799b38f2a1f7264409b7c | |
parent | d910701d188739c7bf08f95627a2c967342937e7 (diff) |
fanotify16: Fix build for systems without fanotify_fid_t
Fixes: d20a3e8f9 ("syscalls/fanotify: New test for FAN_MODIFY_DIR")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
-rw-r--r-- | testcases/kernel/syscalls/fanotify/fanotify16.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/testcases/kernel/syscalls/fanotify/fanotify16.c b/testcases/kernel/syscalls/fanotify/fanotify16.c index 9a9591100..d366a455f 100644 --- a/testcases/kernel/syscalls/fanotify/fanotify16.c +++ b/testcases/kernel/syscalls/fanotify/fanotify16.c @@ -36,16 +36,17 @@ #define BUF_SIZE 256 -static char fname1[BUF_SIZE + 11], fname2[BUF_SIZE + 11]; -static char dname1[BUF_SIZE], dname2[BUF_SIZE]; -static int fd_notify; - +#ifdef HAVE_NAME_TO_HANDLE_AT struct event_t { unsigned long long mask; struct fanotify_fid_t *fid; char name[BUF_SIZE]; }; +static char fname1[BUF_SIZE + 11], fname2[BUF_SIZE + 11]; +static char dname1[BUF_SIZE], dname2[BUF_SIZE]; +static int fd_notify; + static struct event_t event_set[EVENT_MAX]; static char event_buf[EVENT_BUF_LEN]; @@ -399,5 +400,8 @@ static struct tst_test test = { }; #else + TST_TEST_TCONF("system does not have required name_to_handle_at() support"); +#endif +#else TST_TEST_TCONF("system doesn't have required fanotify support"); #endif |