diff libpurple/protocols/gg/lib/dcc7.c @ 29939:db6735e579f8

Partially fix libgadu build on Win32. Refs #10542. I'm still not sure how to handle all the stuff in resolver.c for DNS resolution. I couldn't quite see how to reconcile our earlier stuff with this new code. Hopefully a more skilled Win32 developer can finish this.
author John Bailey <rekkanoryo@rekkanoryo.org>
date Mon, 22 Feb 2010 00:36:15 +0000
parents 6359fde67f4c
children a42f7d3ad459
line wrap: on
line diff
--- a/libpurple/protocols/gg/lib/dcc7.c	Sun Feb 21 16:52:42 2010 +0000
+++ b/libpurple/protocols/gg/lib/dcc7.c	Mon Feb 22 00:36:15 2010 +0000
@@ -28,15 +28,21 @@
  * \brief Obsługa połączeń bezpośrednich od wersji Gadu-Gadu 7.x
  */
 
+#include "libgadu.h"
+
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#ifdef sun
-#  include <sys/filio.h>
+
+#ifndef _WIN32
+#  include <sys/ioctl.h>
+#  include <sys/socket.h>
+#  include <netinet/in.h>
+#  include <arpa/inet.h>
+#  ifdef sun
+#    include <sys/filio.h>
+#  endif
 #endif
+
 #include <time.h>
 
 #include <ctype.h>
@@ -49,7 +55,6 @@
 #include <unistd.h>
 
 #include "compat.h"
-#include "libgadu.h"
 
 #define gg_debug_dcc(dcc, fmt...) \
 	gg_debug_session((dcc) ? (dcc)->sess : NULL, fmt)
@@ -942,7 +947,7 @@
 		{
 			struct sockaddr_in sin;
 			int fd, one = 1;
-			unsigned int sin_len = sizeof(sin);
+			socklen_t sin_len = sizeof(sin);
 
 			gg_debug_dcc(dcc, GG_DEBUG_MISC, "// gg_dcc7_watch_fd() GG_STATE_LISTENING\n");