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

Mac OS X support #3

Merged
merged 6 commits into from
Jun 26, 2016
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
3 changes: 2 additions & 1 deletion lib/Fuse_bindings.idl
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
applejack@users.sf.net
vincenzo_ml@yahoo.it
*/

quote(h,"#define FUSE_USE_VERSION 26")
quote(h,"#include <fuse.h>")


typedef [abstract] void * fuse;
quote(mlmli,"type fuse_operations")
quote(mlmli,"type fuse_cmd")
Expand Down
10 changes: 9 additions & 1 deletion lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@ OCAMLMAKEFILE=../OCamlMakefile
SOURCES=Result.ml Unix_util.ml Unix_util_stubs.c Fuse_bindings.idl Fuse_util.c Fuse_lib.ml Fuse.ml
RESULT=Fuse
LIBS=bigarray
CLIBS=fuse
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
CLIBS=osxfuse
CPPFLAGS=-I/usr/local/include/osxfuse
INCDIRS=$(shell opam config var lib)/camlidl
LIBDIRS=/usr/local/lib
else
CLIBS=fuse
endif
OCAMLLDFLAGS=-linkall
THREADS=threads
TRASH=*~ \\\#*
Expand Down
4 changes: 4 additions & 0 deletions lib/Unix_util_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@
#include <stddef.h>
#include <string.h>
#include <errno.h>
#if defined(__APPLE__)
#include <sys/mount.h>
#else
#include <sys/vfs.h>
#endif
#include <sys/statvfs.h>

#include <caml/mlvalues.h>
Expand Down