diff --git a/HFuse.cabal b/HFuse.cabal index 836a327..fac3d14 100644 --- a/HFuse.cabal +++ b/HFuse.cabal @@ -16,11 +16,17 @@ Library Build-Depends: base >= 4 && < 5, unix, bytestring exposed-Modules: System.Fuse Extensions: ForeignFunctionInterface ScopedTypeVariables EmptyDataDecls - Includes: sys/statfs.h, dirent.h, fuse.h, fcntl.h + Includes: dirent.h, fuse.h, fcntl.h + if os(freebsd) { + Includes: sys/param.h, sys/mount.h + CC-Options: -Df_namelen=f_namemax + } else { + Includes: sys/statfs.h + } Include-Dirs: /usr/include, /usr/local/include, . Extra-Libraries: fuse Extra-Lib-Dirs: /usr/local/lib - CC-Options: -D_FILE_OFFSET_BITS=64 + CC-Options: -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26 if os(darwin) { CC-Options: "-DMACFUSE" } diff --git a/System/Fuse.hsc b/System/Fuse.hsc index f7347fd..38f18ec 100644 --- a/System/Fuse.hsc +++ b/System/Fuse.hsc @@ -77,9 +77,7 @@ import qualified System.IO.Error as IO(catch,ioeGetErrorString) -- TODO: implement binding to fuse_invalidate -- TODO: bind fuse_*xattr -#define FUSE_USE_VERSION 26 - -#ifdef MACFUSE +#if defined MACFUSE || defined __FreeBSD__ #include #else #include