From: pk910 Date: Thu, 31 Jul 2014 18:34:27 +0000 (+0200) Subject: [IOMultiplexerV2] fixed some WIN32 compilation issues X-Git-Url: http://git.pk910.de/?p=IOMultiplexer.git;a=commitdiff_plain;h=d2ac212695ab026aebc171d0d7c615f29c03a77c [IOMultiplexerV2] fixed some WIN32 compilation issues --- diff --git a/src/IOHandler/IODNSLookup.c b/src/IOHandler/IODNSLookup.c index e620163..36c1f04 100644 --- a/src/IOHandler/IODNSLookup.c +++ b/src/IOHandler/IODNSLookup.c @@ -6,6 +6,7 @@ * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -37,6 +38,7 @@ #include #include #endif +#include "compat/inet.h" #include @@ -238,7 +240,7 @@ int iodns_print_address(struct IODNSAddress *address, int ipv6, char *buffer, in af = AF_INET; addr = (void *)(&((struct sockaddr_in *)address->address)->sin_addr); } - buffer = inet_ntop(af, addr, buffer, length); + buffer = (char*) inet_ntop(af, addr, buffer, length); if(!buffer) return 0; else diff --git a/src/IOHandler/IOSockets.c b/src/IOHandler/IOSockets.c index 9344de5..d67da51 100644 --- a/src/IOHandler/IOSockets.c +++ b/src/IOHandler/IOSockets.c @@ -504,7 +504,7 @@ static void iosocket_update_parent(struct _IOSocket *iosock) { else iosock->bind.addr.addresslen = sizeof(struct sockaddr_in); iosock->bind.addr.address = malloc(iosock->bind.addr.addresslen); - getsockname(iosock->fd, (struct sockaddr *)iosock->bind.addr.address, &iosock->bind.addr.addresslen); + getsockname(iosock->fd, (struct sockaddr *)iosock->bind.addr.address, (socklen_t *)&iosock->bind.addr.addresslen); } } }