Mercurial > pidgin.yaz
diff libpurple/protocols/gg/lib/dcc.c @ 32827:4a34689eeb33 default tip
merged from im.pidgin.pidgin
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Sat, 19 Nov 2011 14:42:54 +0900 |
parents | e2ff2ac0e022 |
children |
line wrap: on
line diff
--- a/libpurple/protocols/gg/lib/dcc.c Mon Sep 26 14:57:21 2011 +0900 +++ b/libpurple/protocols/gg/lib/dcc.c Sat Nov 19 14:42:54 2011 +0900 @@ -26,16 +26,11 @@ * \brief Obsługa połączeń bezpośrednich do wersji Gadu-Gadu 6.x */ +#include "compat.h" #include <sys/types.h> #include <sys/stat.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 +#ifdef sun +# include <sys/filio.h> #endif #include <ctype.h> @@ -601,7 +596,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 +643,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 {