changeset 32300:9c9143e32b6c

Gadu-Gadu: fix win32 warnings, patch from upstream.
author tomkiewicz@cpw.pidgin.im
date Mon, 17 Oct 2011 20:09:23 +0000
parents e96c34989561
children 326591e64aaa
files libpurple/protocols/gg/lib/dcc.c libpurple/protocols/gg/lib/dcc7.c libpurple/protocols/gg/lib/handlers.c
diffstat 3 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/gg/lib/dcc.c	Sun Oct 16 08:20:07 2011 +0000
+++ b/libpurple/protocols/gg/lib/dcc.c	Mon Oct 17 20:09:23 2011 +0000
@@ -601,7 +601,7 @@
 		struct sockaddr_in sin;
 		struct gg_dcc *c;
 		int fd, one = 1;
-		unsigned int sin_len = sizeof(sin);
+		socklen_t sin_len = sizeof(sin);
 
 		if ((fd = accept(h->fd, (struct sockaddr*) &sin, &sin_len)) == -1) {
 			gg_debug(GG_DEBUG_MISC, "// gg_dcc_watch_fd() can't accept() new connection (errno=%d, %s)\n", errno, strerror(errno));
@@ -648,7 +648,8 @@
 		struct gg_dcc_small_packet small;
 		struct gg_dcc_big_packet big;
 		int size, tmp, res;
-		unsigned int utmp, res_size = sizeof(res);
+		unsigned int utmp;
+		socklen_t res_size = sizeof(res);
 		char buf[1024], ack[] = "UDAG";
 
 		struct gg_dcc_file_info_packet {
--- a/libpurple/protocols/gg/lib/dcc7.c	Sun Oct 16 08:20:07 2011 +0000
+++ b/libpurple/protocols/gg/lib/dcc7.c	Mon Oct 17 20:09:23 2011 +0000
@@ -1095,7 +1095,7 @@
 		case GG_STATE_CONNECTING:
 		{
 			int res = 0, error = 0;
-			unsigned int error_size = sizeof(error);
+			socklen_t error_size = sizeof(error);
 
 			gg_debug_dcc(dcc, GG_DEBUG_MISC, "// gg_dcc7_watch_fd() GG_STATE_CONNECTING\n");
 
@@ -1384,7 +1384,7 @@
 		case GG_STATE_CONNECTING_RELAY:
 		{
 			int res;
-			unsigned int res_size = sizeof(res);
+			socklen_t res_size = sizeof(res);
 			struct gg_dcc7_relay_req pkt;
 
 			gg_debug_dcc(dcc, GG_DEBUG_MISC, "// gg_dcc7_watch_fd() GG_STATE_CONNECTING_RELAY\n");
--- a/libpurple/protocols/gg/lib/handlers.c	Sun Oct 16 08:20:07 2011 +0000
+++ b/libpurple/protocols/gg/lib/handlers.c	Mon Oct 17 20:09:23 2011 +0000
@@ -92,7 +92,7 @@
 	uint8_t hash_buf[64];
 	uint32_t local_ip;
 	struct sockaddr_in sin;
-	unsigned int sin_len = sizeof(sin);
+	socklen_t sin_len = sizeof(sin);
 
 	if (len < sizeof(struct gg_welcome)) {
 		ge->type = GG_EVENT_CONN_FAILED;