Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-07-18 10:26:58 +0400
committerRyan Dahl <ry@tinyclouds.org>2010-07-18 10:26:58 +0400
commit02746eddd6f789f0719a2ec627fe1c79d5a274c6 (patch)
treeb475827400b5ee9f297f21314a717dc05c41a290 /src/node_net.cc
parent341e41726febd84565cf7a4fbf2b13143faf7e0d (diff)
Apple's SUN_LEN is broken, override
Diffstat (limited to 'src/node_net.cc')
-rw-r--r--src/node_net.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/node_net.cc b/src/node_net.cc
index f5a15ccb7f7..516994be23c 100644
--- a/src/node_net.cc
+++ b/src/node_net.cc
@@ -350,12 +350,11 @@ static Handle<Value> Connect(const Arguments& args) {
return Undefined();
}
-#if !defined(SUN_LEN)
-# if defined(__APPLE__)
-# define SUN_LEN(ptr) ((ptr)->sun_len-2)
-# else
-# define SUN_LEN(ptr) strlen((ptr)->sun_path)
-#endif
+// Mac's SUN_LEN is broken
+#if defined(__APPLE__)
+# define SUN_LEN(ptr) ((ptr)->sun_len-2)
+#elif !defined(SUN_LEN)
+# define SUN_LEN(ptr) strlen((ptr)->sun_path)
#endif
#define ADDRESS_TO_JS(info, address_storage) \