Index: src/framework/Platform/Define.h =================================================================== --- src/framework/Platform/Define.h (revision 5712) +++ src/framework/Platform/Define.h (working copy) @@ -23,6 +23,7 @@ #include #if PLATFORM == PLATFORM_WINDOWS + #define MANGOS_EXPORT __declspec(dllexport) #define MANGOS_LIBRARY_HANDLE HMODULE #define MANGOS_LOAD_LIBRARY(a) LoadLibrary(a) @@ -32,23 +33,32 @@ #define MANGOS_SCRIPT_EXT ".dll" #define MANGOS_SCRIPT_NAME "MaNGOSScript" #define SIGQUIT 3 + #else + #define MANGOS_LIBRARY_HANDLE void* #define MANGOS_EXPORT export #define MANGOS_LOAD_LIBRARY(a) dlopen(a,RTLD_NOW) #define MANGOS_CLOSE_LIBRARY dlclose #define MANGOS_GET_PROC_ADDR dlsym -#if defined(__APPLE_CC__) && defined(BIG_ENDIAN) +#if PLATFORM == PLATFORM_APPLE && defined(BIG_ENDIAN) #define MANGOS_IMPORT __attribute__ ((longcall)) #else #define MANGOS_IMPORT __attribute__ ((cdecl)) #endif +#if PLATFORM == PLATFORM_APPLE +#define MANGOS_SCRIPT_EXT ".dylib" +#define MANGOS_SCRIPT_NAME "../lib/libmangosscript" +#else #define MANGOS_SCRIPT_EXT ".so" #define MANGOS_SCRIPT_NAME "libmangosscript" #endif +#endif + + #ifdef WIN32 #ifdef MANGOS_WIN32_DLL_IMPORT Index: contrib/map_extractor/libmpq/mpq.h =================================================================== --- contrib/map_extractor/libmpq/mpq.h (revision 5712) +++ contrib/map_extractor/libmpq/mpq.h (working copy) @@ -37,6 +37,9 @@ #endif +#define lseek64 lseek + + #define LIBMPQ_MAJOR_VERSION 0 /* Major version number... maybe sometimes we reach version 1 :) */ #define LIBMPQ_MINOR_VERSION 3 /* Minor version number - increased only for small changes */ #define LIBMPQ_PATCH_VERSION 0 /* Patchlevel - changed on bugfixes etc... */ Index: dep/src/zthread/Makefile.am =================================================================== --- dep/src/zthread/Makefile.am (revision 5712) +++ dep/src/zthread/Makefile.am (working copy) @@ -21,7 +21,7 @@ ## Process this file with automake to produce Makefile.in ## CPP flags for includes, defines, etc. -AM_CPPFLAGS = -I$(srcdir)/../../include -I$(srcdir)/../../include/zthread +AM_CPPFLAGS = -iquote$(srcdir)/../../include -iquote$(srcdir)/../../include/zthread ## Build ZThread as shared library. # libZThread shared library will later be reused by realm list daemon Index: dep/src/sockets/TcpSocket.cpp =================================================================== --- dep/src/sockets/TcpSocket.cpp (revision 5712) +++ dep/src/sockets/TcpSocket.cpp (working copy) @@ -39,6 +39,9 @@ #include #include #include +#if defined(__APPLE_CC__) +#include +#endif #ifdef HAVE_OPENSSL #include #include @@ -498,7 +501,12 @@ else #endif // HAVE_OPENSSL { +#if defined(__APPLE_CC__) + sigignore(SIGPIPE); + n = recv(GetSocket(), buf, TCP_BUFSIZE_READ, 0); +#else n = recv(GetSocket(), buf, TCP_BUFSIZE_READ, MSG_NOSIGNAL); +#endif if (n == -1) { Handler().LogError(this, "read", Errno, StrError(Errno), LOG_LEVEL_FATAL); @@ -753,7 +761,12 @@ else #endif // HAVE_OPENSSL { +#if defined(__APPLE_CC__) + sigignore(SIGPIPE); + n = send(GetSocket(), buf, (int)len, 0); +#else n = send(GetSocket(), buf, (int)len, MSG_NOSIGNAL); +#endif if (n == -1) { // normal error codes: