diff src/stun.c @ 11364:e1840eb860e7

[gaim-migrate @ 13588] Make the stun stuff compile on win32. This is largely untested since this code will not currently ever be called, but it compiles. This is based on a patch from Fran?ois Gagn?." committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 30 Aug 2005 00:32:32 +0000
parents 97028c1c69e9
children 6e02e20e3a58
line wrap: on
line diff
--- a/src/stun.c	Mon Aug 29 21:48:22 2005 +0000
+++ b/src/stun.c	Tue Aug 30 00:32:32 2005 +0000
@@ -26,11 +26,15 @@
  *
  */
 
+#ifndef _WIN32
 #include <sys/socket.h>
 #include <ifaddrs.h>
 #include <net/if.h>
 #include <sys/ioctl.h>
 #include <resolv.h>
+#else
+#include "libc_interface.h"
+#endif
 
 #include "internal.h"
 
@@ -141,9 +145,8 @@
 		tmp = buffer;
 		while(tmp < buffer + ifc.ifc_len) {
 			ifr = (struct ifreq *) tmp;
-			len = sizeof(struct sockaddr);
 
-			tmp += sizeof(ifr->ifr_name) + len;
+			tmp += sizeof(struct ifreq);
 
 			if(ifr->ifr_addr.sa_family == AF_INET) {
 				// we only care about ipv4 interfaces