Apple's SUN_LEN is broken, override

v0.7.4-release
Ryan Dahl 2010-07-17 23:26:58 -07:00
parent 341e41726f
commit 02746eddd6
1 changed files with 5 additions and 6 deletions

View File

@ -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) \