--- a/src/fsevents/fsevents_stubs.c 2022-10-19 21:58:04 +++ b/src/fsevents/fsevents_stubs.c 2024-02-21 14:57:28 @@ -7,7 +7,11 @@ #include #if defined(__APPLE__) +#include +#endif +#if defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED >= 101000 + #include #include #include @@ -88,7 +92,7 @@ continue; } CFStringRef cf_path; -#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101300 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101300 CFDictionaryRef details = CFArrayGetValueAtIndex(eventPaths, i); cf_path = CFDictionaryGetValue(details, kFSEventStreamEventExtendedDataPathKey); #else @@ -154,7 +158,7 @@ const FSEventStreamEventFlags flags = kFSEventStreamCreateFlagNoDefer | -#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101300 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101300 kFSEventStreamCreateFlagUseExtendedData | #endif kFSEventStreamCreateFlagUseCFTypes | kFSEventStreamCreateFlagFileEvents; @@ -331,7 +335,12 @@ #else -static char *unavailable_message = "fsevents is only available on macos"; +static char *unavailable_message = +#if defined(__APPLE__) + "upgrade your macos sdk to enable watch mode"; +#else + "fsevents is only available on macos"; +#endif CAMLprim value dune_fsevents_stop(value v_t) { caml_failwith(unavailable_message);