Commits

seanmcl committed 6792c7a

OSX inotify compatibility

  • Participants
  • Parent commits a3c641a

Comments (0)

Files changed (1)

File ocaml/contrib/ocaml_inotify/inotify_stubs.c

 #include <caml/signals.h>
 #include <caml/callback.h>
 
+#ifdef __linux__
+
 #include <features.h>
 
-#ifdef __linux__
-
 #if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 4
 #define GLIBC_SUPPORT_INOTIFY 1
 #else
 #else
 
 value stub_inotify_init(value unit){
+  CAMLparam1(unit);
   CAMLreturn(Val_int(-1));
 }
 
 value stub_inotify_add_watch(value fd, value path, value mask){
+  CAMLparam3(fd, path, mask);
   CAMLreturn(Val_int(-1));
 }
 
 value stub_inotify_rm_watch(value fd, value wd){
+  CAMLparam2(fd, wd);
   CAMLreturn(Val_unit);
 }
 
 value stub_inotify_struct_size(void){
+  CAMLparam0();
   CAMLreturn(Val_int(-1));
 }
 
 value stub_inotify_convert(value buf){
-  CAMLlocal(event);
+  CAMLparam1(buf);
+  CAMLlocal1(event);
   event = caml_alloc_tuple(4);
   Store_field(event, 0, Val_int(-1));
   Store_field(event, 1, Val_emptylist);