diff --git a/ixwebsocket/IXDNSLookup.cpp b/ixwebsocket/IXDNSLookup.cpp index 5966be23..cc39a383 100644 --- a/ixwebsocket/IXDNSLookup.cpp +++ b/ixwebsocket/IXDNSLookup.cpp @@ -35,6 +35,12 @@ #endif #endif +#ifdef __APPLE__ +#ifndef AI_NUMERICSERV +#define AI_NUMERICSERV 0 +#endif +#endif + namespace ix { const int64_t DNSLookup::kDefaultWait = 1; // ms diff --git a/ixwebsocket/IXSetThreadName.cpp b/ixwebsocket/IXSetThreadName.cpp index b1e77379..2f4ee75b 100644 --- a/ixwebsocket/IXSetThreadName.cpp +++ b/ixwebsocket/IXSetThreadName.cpp @@ -15,6 +15,10 @@ #include #endif +#ifdef __APPLE__ +#include +#endif + // Windows #ifdef _WIN32 #include @@ -58,7 +62,7 @@ namespace ix void setThreadName(const std::string& name) { -#if defined(__APPLE__) +#if defined(__APPLE__) && (MAC_OS_X_VERSION_MIN_REQUIRED >= 1060) // // Apple reserves 16 bytes for its thread names // Notice that the Apple version of pthread_setname_np