From d489555553fe2f41c827465adfc89519618b20fd Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 26 Jul 2010 19:07:31 -0700 Subject: [PATCH] Use kqueue on recent macintosh builds --- src/node.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/node.cc b/src/node.cc index 6915c181a3..b433940263 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1783,10 +1783,12 @@ int main(int argc, char *argv[]) { // Initialize the default ev loop. -#ifdef __sun +#if defined(__sun) // TODO(Ryan) I'm experiencing abnormally high load using Solaris's // EVBACKEND_PORT. Temporarally forcing select() until I debug. ev_default_loop(EVBACKEND_POLL); +#elif defined(__APPLE_CC__) && __APPLE_CC__ >= 5659 + ev_default_loop(EVBACKEND_KQUEUE); #else ev_default_loop(EVFLAG_AUTO); #endif