diff --git a/ll.c b/ll.c index 4b89061..fd328fa 100644 --- a/ll.c +++ b/ll.c @@ -410,7 +410,12 @@ void sqfs_ll_op_getxattr(fuse_req_t req, fuse_ino_t ino, } void sqfs_ll_op_forget(fuse_req_t req, fuse_ino_t ino, - unsigned long nlookup) { +#ifdef HAVE_FUSE_LL_FORGET_OP_64T + uint64_t nlookup +#else + unsigned long nlookup +#endif + ) { sqfs_ll_i lli; update_access_time(); sqfs_ll_iget(req, &lli, SQFS_FUSE_INODE_NONE); diff --git a/ll.h b/ll.h index f8721a2..a5550b6 100644 --- a/ll.h +++ b/ll.h @@ -109,7 +109,12 @@ void sqfs_ll_op_getxattr(fuse_req_t req, fuse_ino_t ino, ); void sqfs_ll_op_forget(fuse_req_t req, fuse_ino_t ino, - unsigned long nlookup); +#ifdef HAVE_FUSE_LL_FORGET_OP_64T + uint64_t nlookup +#else + unsigned long nlookup +#endif + ); void sqfs_ll_op_init(void *userdata, struct fuse_conn_info *conn); diff --git a/m4/squashfuse_fuse.m4 b/m4/squashfuse_fuse.m4 index bf85c92..3773df5 100644 --- a/m4/squashfuse_fuse.m4 +++ b/m4/squashfuse_fuse.m4 @@ -272,6 +272,25 @@ AC_DEFUN([SQ_FUSE_API_VERSION],[ [Define if we have two-argument fuse_unmount]) ]) + AC_CACHE_CHECK([for 64_t third argument to fuse ll forget op], + [sq_cv_decl_fuse_forget_64_t],[ + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([ + #include + #include ], + [ + void f(fuse_req_t, fuse_ino_t, uint64_t); + struct fuse_lowlevel_ops flo; + flo.forget = f; + ])], + [sq_cv_decl_fuse_forget_64_t=yes], + [sq_cv_decl_fuse_forget_64_t=no]) + ]) + AS_IF([test "x$sq_cv_decl_fuse_forget_64_t" = xyes],[ + AC_DEFINE([HAVE_FUSE_LL_FORGET_OP_64T],1, + [Define if we have uint64_t as type of 3rd arg to ll forget op]) + ]) + AC_CHECK_DECLS([fuse_cmdline_help],,, [#include ]) ])