diff --git a/includes/NativeInterface.h b/includes/NativeInterface.h index e2322d7c..68bf789b 100644 --- a/includes/NativeInterface.h +++ b/includes/NativeInterface.h @@ -4,7 +4,7 @@ #if defined(_WIN32) #include "../includes/win32/Controller.h" using NativeImplementation = Controller; -#elif defined(__APPLE_CC__) +#elif defined(__APPLE__) #include "../includes/osx/FSEventsService.h" using NativeImplementation = FSEventsService; #elif defined(__linux__) || defined(__FreeBSD__) diff --git a/src/NSFW.cpp b/src/NSFW.cpp index 13eb8a65..724a4773 100644 --- a/src/NSFW.cpp +++ b/src/NSFW.cpp @@ -48,7 +48,7 @@ void NSFW::fireErrorCallback(uv_async_t *handle) { v8::Local argv[] = { New(baton->error).ToLocalChecked() }; - baton->nsfw->mErrorCallback->Call(1, argv); + baton->nsfw->mErrorCallback->Call(1, argv, nullptr); delete baton; } @@ -59,7 +59,7 @@ void NSFW::fireEventCallback(uv_async_t *handle) { uv_thread_t cleanup; uv_thread_create(&cleanup, NSFW::cleanupEventCallback, baton); - #if defined(__APPLE_CC__) || defined(__linux__) || defined(__FreeBSD__) + #if defined(__unix__) pthread_detach(cleanup); #endif @@ -90,12 +90,12 @@ void NSFW::fireEventCallback(uv_async_t *handle) { eventArray }; - baton->nsfw->mEventCallback->Call(1, argv); + baton->nsfw->mEventCallback->Call(1, argv, nullptr); uv_thread_t cleanup; uv_thread_create(&cleanup, NSFW::cleanupEventCallback, baton); - #if defined(__APPLE_CC__) || defined(__linux__) || defined(__FreeBSD__) + #if defined(__unix__) pthread_detach(cleanup); #endif } @@ -206,7 +206,7 @@ NAN_METHOD(NSFW::Start) { v8::Local argv[1] = { Nan::Error("This NSFW cannot be started, because it is already running.") }; - callback->Call(1, argv); + callback->Call(1, argv, nullptr); delete callback; return; } @@ -252,9 +252,9 @@ void NSFW::StartWorker::HandleOKCallback() { v8::Local argv[1] = { Nan::Error("NSFW was unable to start watching that directory.") }; - callback->Call(1, argv); + callback->Call(1, argv, nullptr); } else { - callback->Call(0, NULL); + callback->Call(0, nullptr, nullptr); } } @@ -279,7 +279,7 @@ NAN_METHOD(NSFW::Stop) { v8::Local argv[1] = { Nan::Error("This NSFW cannot be stopped, because it is not running.") }; - callback->Call(1, argv); + callback->Call(1, argv, nullptr); delete callback; return; } @@ -321,7 +321,7 @@ void NSFW::StopWorker::HandleOKCallback() { uv_close(reinterpret_cast(&mNSFW->mErrorCallbackAsync), nullptr); uv_close(reinterpret_cast(&mNSFW->mEventCallbackAsync), nullptr); - callback->Call(0, NULL); + callback->Call(0, nullptr, nullptr); } NODE_MODULE(nsfw, NSFW::Init)