Merge remote-tracking branch 'remotes/IOMultiplexer/v2'
authorpk910 <philipp@zoelle1.de>
Thu, 31 Jul 2014 18:35:18 +0000 (20:35 +0200)
committerpk910 <philipp@zoelle1.de>
Thu, 31 Jul 2014 18:35:18 +0000 (20:35 +0200)
src/IOHandler/IODNSLookup.c
src/IOHandler/IOSockets.c

index e6201639fa84af990c2e4fa6cd3b3a5bf376837b..36c1f044cd23b45ddfa62085d5368f234dbfbe17 100644 (file)
@@ -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 <unistd.h>
 #include <fcntl.h>
 #endif
+#include "compat/inet.h"
 
 #include <string.h>
 
@@ -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
index d83d0fc40b1ba879604dc0e7f52c8367c1750da4..55c6cee6035114c67550db8b8fc98307b0fe15ae 100644 (file)
@@ -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);
                }
        }
 }