From: pk910 Date: Thu, 31 Jul 2014 18:35:18 +0000 (+0200) Subject: Merge remote-tracking branch 'remotes/IOMultiplexer/v2' X-Git-Url: http://git.pk910.de/?p=NextIRCd.git;a=commitdiff_plain;h=93a69acc63c1e367e2cdbea1e60dc34884ec69e4;hp=4e79b9632a41b2c7d2fecb4e4514692f9cf7e7f9 Merge remote-tracking branch 'remotes/IOMultiplexer/v2' --- 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 d83d0fc..55c6cee 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); } } }