Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 32 bit compile on Fedora 40 #126

Merged
merged 1 commit into from
Feb 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion ll.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 6 additions & 1 deletion ll.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
19 changes: 19 additions & 0 deletions m4/squashfuse_fuse.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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 <fuse.h>
#include <fuse_lowlevel.h>],
[
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 <fuse_lowlevel.h>])
])
Expand Down
Loading