From 3d9de13f1bd0a747615ddb3fa5f9c7c7d3500d5c Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Fri, 14 Sep 2012 03:56:12 +0200 Subject: [PATCH] darwin: fix build when minimum OS X version is specified The OS X version was being checked with the __MAC_OS_X_VERSION_MIN_REQUIRED__ macro, but this value doesn't match the actual SDK version when it is overridden with the -mmacosx-version-min command line switch. --- src/unix/internal.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/unix/internal.h b/src/unix/internal.h index 4abfedde..20dd23c7 100644 --- a/src/unix/internal.h +++ b/src/unix/internal.h @@ -63,6 +63,10 @@ # define HAVE_KQUEUE 1 #endif +#if defined(__APPLE__) && !defined(TARGET_OS_IPHONE) +# include +#endif + #define UNREACHABLE() \ do { \ assert(0 && "unreachable code"); \ @@ -198,7 +202,7 @@ int uv__fsevents_init(uv_fs_event_t* handle); int uv__fsevents_close(uv_fs_event_t* handle); /* OSX < 10.7 has no file events, polyfill them */ -#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070 +#ifndef MAC_OS_X_VERSION_10_7 static const int kFSEventStreamCreateFlagFileEvents = 0x00000010; static const int kFSEventStreamEventFlagItemCreated = 0x00000100;