From d2ac212695ab026aebc171d0d7c615f29c03a77c Mon Sep 17 00:00:00 2001 From: pk910 Date: Thu, 31 Jul 2014 20:34:27 +0200 Subject: [PATCH] [IOMultiplexerV2] fixed some WIN32 compilation issues --- src/IOHandler/IODNSLookup.c | 4 +++- src/IOHandler/IOSockets.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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); } } } -- 2.20.1