Easier FreeBSD support, allow FUSE >= 2.3 for FreeBSD
parent
69240e3c50
commit
3001c88d64
|
@ -215,12 +215,12 @@ if test "$enable_fuse_module" != "no"; then
|
|||
fi
|
||||
]);;
|
||||
freebsd*)
|
||||
PKG_CHECK_MODULES(FUSE_MODULE, fuse >= 2.5.0, [ compile_fuse_module=true ],
|
||||
PKG_CHECK_MODULES(FUSE_MODULE, fuse >= 2.3.0, [ compile_fuse_module=true ],
|
||||
[
|
||||
if test "$enable_fuse_module" = "yes"; then
|
||||
AC_MSG_ERROR([ntfsmount requires FUSE version >= 2.5.0.])
|
||||
AC_MSG_ERROR([ntfsmount requires FUSE version >= 2.3.0.])
|
||||
else
|
||||
AC_MSG_WARN([ntfsmount requires FUSE version >= 2.5.0.])
|
||||
AC_MSG_WARN([ntfsmount requires FUSE version >= 2.3.0.])
|
||||
fi
|
||||
]);;
|
||||
*) AC_MSG_ERROR([ntfsmount can be built only under Linux and FreeBSD.]);;
|
||||
|
|
|
@ -24,11 +24,6 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#undef FUSE_USE_VERSION
|
||||
#define FUSE_USE_VERSION 25
|
||||
#endif /* __FreeBSD__ */
|
||||
|
||||
#include <fuse.h>
|
||||
#ifdef HAVE_STDIO_H
|
||||
#include <stdio.h>
|
||||
|
@ -76,12 +71,6 @@
|
|||
#define PATH_MAX 4096
|
||||
#endif
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
typedef struct statvfs nf_statfs;
|
||||
#else
|
||||
typedef struct statfs nf_statfs;
|
||||
#endif /* __FreeBSD__ */
|
||||
|
||||
typedef struct {
|
||||
fuse_fill_dir_t filler;
|
||||
void *buf;
|
||||
|
@ -218,7 +207,7 @@ static __inline__ void ntfs_fuse_mark_free_space_outdate(void)
|
|||
* Return 0 on success or -errno on error.
|
||||
*/
|
||||
static int ntfs_fuse_statfs(const char *path __attribute__((unused)),
|
||||
nf_statfs *sfs)
|
||||
struct statfs *sfs)
|
||||
{
|
||||
long size;
|
||||
ntfs_volume *vol;
|
||||
|
@ -226,10 +215,8 @@ static int ntfs_fuse_statfs(const char *path __attribute__((unused)),
|
|||
vol = ctx->vol;
|
||||
if (!vol)
|
||||
return -ENODEV;
|
||||
#ifndef __FreeBSD__
|
||||
/* Type of filesystem. */
|
||||
sfs->f_type = NTFS_SB_MAGIC;
|
||||
#endif /* __FreeBSD__ */
|
||||
/* Optimal transfer block size. */
|
||||
sfs->f_bsize = vol->cluster_size;
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue