Jump to content

[patch][6254] Socket_include.h Patch For Macosx

Guest DeeDee

Recommended Posts

What bug does the patch fix? What features does the patch add? Make socket_include pick the MacOSX part for Apple computers :)

For which SubVersion revision was the patch created? 6216

Is there a thread in the bug report section? No.

Who has been writing this patch? Me, Deedee, when I found it wasn't fully working.

Index: dep/include/sockets/socket_include.h
--- dep/include/sockets/socket_include.h        (revision 6216)
+++ dep/include/sockets/socket_include.h        (working copy)
@@ -157,7 +157,7 @@
#    include <netinet/in.h>    
typedef in_addr_t ipaddr_t;    
typedef in_port_t port_t;    
-#elif defined MACOSX 
+#elif defined __APPLE__
// ----------------------------------------
// Mac OS X
#include <string.h>

(MACOSX define doesn't work, __APPLE__ one does.)

Link to comment
Share on other sites

MaNGOS uses a 3rd party C++ Sockets library and MACOSX is defined in a Makefile.Defines file, which MaNGOS doesn't use. Your patch isn't complete because MACOSX is also tested in these additional files:




Since any changes made can be lost the next time MaNGOS updates the sockets library, a more simpler patch to a common file could be something like:

Index: dep/include/sockets/sockets-config.h
--- dep/include/sockets/sockets-config.h                (revision 6216)
+++ dep/include/sockets/sockets-config.h                (working copy)
@@ -38,6 +38,9 @@
#endif // _RUN_DP

+#if defined(__APPLE__) && defined(__MACH__) && !defined(MACOSX)
+#define MACOSX

/* OpenSSL support. */
//#define HAVE_OPENSSL

But from testing, it seems that further patches are needed to fix code that is now active (for Tiger atleast).

Link to comment
Share on other sites

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use