Skip to content

Commit

Permalink
Merge pull request vasi#109 from vasi/fuse3-bsd
Browse files Browse the repository at this point in the history
Fix header paths for fuse3
  • Loading branch information
vasi authored Aug 7, 2023
2 parents d7e660a + eca5764 commit 21ab372
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 14 deletions.
6 changes: 5 additions & 1 deletion fuseprivate.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@

#include "nonstd.h"

#if HAVE_DECL_FUSE_CMDLINE_HELP
#include <fuse_lowlevel.h>
#endif

int sqfs_listxattr(sqfs *fs, sqfs_inode *inode, char *buf, size_t *size) {
sqfs_xattr x;
size_t count = 0;
Expand Down Expand Up @@ -83,7 +87,7 @@ void sqfs_usage(char *progname, bool fuse_usage, bool ll_usage) {
if (fuse_usage) {
if (ll_usage) {
#ifdef SQFS_MULTITHREADED
#if FUSE_USE_VERSION >= 30
#if HAVE_DECL_FUSE_CMDLINE_HELP
fprintf(stderr, "\nFUSE options:\n");
fuse_cmdline_help();
#else
Expand Down
5 changes: 0 additions & 5 deletions fuseprivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@

#include "squashfuse.h"

#if FUSE_USE_VERSION >= 30
#include <fuse3/fuse.h>
#include <fuse3/fuse_lowlevel.h>
#else
#include <fuse.h>
#endif

/* Common functions for FUSE high- and low-level clients */

Expand Down
4 changes: 0 additions & 4 deletions ll.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@

#include "squashfuse.h"

#if FUSE_USE_VERSION >= 30
#include <fuse3/fuse_lowlevel.h>
#else
#include <fuse_lowlevel.h>
#endif

typedef struct sqfs_ll sqfs_ll;
struct sqfs_ll {
Expand Down
3 changes: 3 additions & 0 deletions m4/squashfuse_fuse.m4
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ AC_DEFUN([SQ_FUSE_API_VERSION],[
AC_DEFINE([HAVE_NEW_FUSE_UNMOUNT],1,
[Define if we have two-argument fuse_unmount])
])
AC_CHECK_DECLS([fuse_cmdline_help],,,
[#include <fuse_lowlevel.h>])
])
SQ_RESTORE_FLAGS
Expand Down
4 changes: 0 additions & 4 deletions nonstd-daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@
#include "nonstd-internal.h"

#include <unistd.h>
#if FUSE_USE_VERSION >= 30
#include <fuse3/fuse_lowlevel.h>
#else
#include <fuse_lowlevel.h>
#endif

int sqfs_ll_daemonize(int fg) {
#if HAVE_DECL_FUSE_DAEMONIZE
Expand Down

0 comments on commit 21ab372

Please sign in to comment.