diff --git a/Makefile b/Makefile index 5c53445..b52db4b 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,14 @@ CC = c++ CPPFLAGS += -Wall -W -Wno-multichar -Wno-c++11-narrowing -I. -O2 -g -std=c++11 -LIBS += -lpthread UNAME = $(shell uname -s) ifeq ($(UNAME),Darwin) - FUSE_LIBS += -losxfuse - CPPFLAGS += -I/usr/local/include/osxfuse/fuse + # should use pkg-config but it may not be installed. + FUSE_LIBS += -losxfuse -pthread -liconv + CPPFLAGS += -I/usr/local/include/osxfuse/fuse -D_FILE_OFFSET_BITS=64 -D_DARWIN_USE_64_BIT_INODE else - FUSE_LIBS += -lfuse + CPPFLAGS += $(shell pkg-config --cflags fuse) + FUSE_LIBS += $(shell pkg-config --libs fuse) endif ifdef HAVE_NUFX diff --git a/bin/fuse_pascal.cpp b/bin/fuse_pascal.cpp index 4c4d8b6..83d82e3 100644 --- a/bin/fuse_pascal.cpp +++ b/bin/fuse_pascal.cpp @@ -10,15 +10,10 @@ #include -#ifdef __APPLE__ -#define __DARWIN_64_BIT_INO_T 1 -#endif - -#define _FILE_OFFSET_BITS 64 #define FUSE_USE_VERSION 27 -#include -#include +#include +#include #include #include diff --git a/bin/fuse_pascal_ops.cpp b/bin/fuse_pascal_ops.cpp index 03c0788..907d145 100644 --- a/bin/fuse_pascal_ops.cpp +++ b/bin/fuse_pascal_ops.cpp @@ -1,9 +1,4 @@ -#ifdef __APPLE__ -#define __DARWIN_64_BIT_INO_T 1 -#endif - -#define _FILE_OFFSET_BITS 64 #define FUSE_USE_VERSION 27 #include @@ -19,8 +14,8 @@ -#include -#include +#include +#include diff --git a/bin/profuse.h b/bin/profuse.h index 5e2a080..d7627d4 100644 --- a/bin/profuse.h +++ b/bin/profuse.h @@ -14,15 +14,10 @@ #include -#ifdef __APPLE__ -#define __DARWIN_64_BIT_INO_T 1 -#endif - -#define _FILE_OFFSET_BITS 64 #define FUSE_USE_VERSION 27 -#include -#include +#include +#include #undef ERROR