X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/38bb138f09688c1575766aafdbf296dfeeee0d7d..3c5487b14442ddbc6e43ee2f4475b5a6ba251fb1:/src/mac/carbon/gsocket.c diff --git a/src/mac/carbon/gsocket.c b/src/mac/carbon/gsocket.c index c01b1c4ec1..073d97c483 100644 --- a/src/mac/carbon/gsocket.c +++ b/src/mac/carbon/gsocket.c @@ -76,6 +76,13 @@ #endif /* __GSOCKET_STANDALONE__ */ +#ifndef ntohl +#define ntohl(x) (x) +#define ntohs(x) (x) +#define htonl(x) (x) +#define htons(x) (x) +#endif + void wxCYield() ; #ifdef __WXDEBUG__ #define qDebug 1 @@ -196,7 +203,7 @@ static void SetDefaultEndpointModes(EndpointRef ep , void *data ) /* Global initialisers */ -void GSocket_SetGUIFunctions(struct GSocketGUIFunctionsTable *) +void GSocket_SetGUIFunctions(struct GSocketGUIFunctionsTable *table) { // do nothing, wxMac doesn't have wxBase-GUI separation yet } @@ -1328,7 +1335,7 @@ GSocketError GAddress_INET_SetHostAddress(GAddress *address, CHECK_ADDRESS(address, INET, GSOCK_INVADDR); - address->m_host = hostaddr ; + address->m_host = htonl(hostaddr) ; return GSOCK_NOERROR; } @@ -1409,7 +1416,7 @@ unsigned long GAddress_INET_GetHostAddress(GAddress *address) assert(address != NULL); CHECK_ADDRESS(address, INET, 0); - return address->m_host; + return ntohl(address->m_host); } unsigned short GAddress_INET_GetPort(GAddress *address)