summary refs log tree commit diff stats
path: root/src/common/dcc.c
diff options
context:
space:
mode:
authorBerke Viktor <bviktor@hexchat.org>2012-07-21 14:26:19 +0200
committerBerke Viktor <bviktor@hexchat.org>2012-07-21 14:26:19 +0200
commite7f723539d39f20092aabfb5b51826807e016fe3 (patch)
tree88c887012ba3fbf1b9b9c1208453a98568cbad3b /src/common/dcc.c
parent4cae471af3a4d8e9c7457f76186da809879f566f (diff)
Some aid for compiler warnings
Diffstat (limited to 'src/common/dcc.c')
-rw-r--r--src/common/dcc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/dcc.c b/src/common/dcc.c
index 4c8724d9..18d4219b 100644
--- a/src/common/dcc.c
+++ b/src/common/dcc.c
@@ -40,6 +40,7 @@
 
 #ifdef WIN32
 #include <windows.h>
+#include <io.h>
 #else
 #include <unistd.h>
 #endif
@@ -803,7 +804,6 @@ static gboolean
 dcc_did_connect (GIOChannel *source, GIOCondition condition, struct DCC *dcc)
 {
 	int er;
-	struct sockaddr_in addr;
 	
 #ifdef WIN32
 	if (condition & G_IO_ERR)
@@ -822,6 +822,8 @@ dcc_did_connect (GIOChannel *source, GIOCondition condition, struct DCC *dcc)
 	}
 
 #else
+	struct sockaddr_in addr;
+
 	memset (&addr, 0, sizeof (addr));
 	addr.sin_port = htons (dcc->port);
 	addr.sin_family = AF_INET;
@@ -1980,7 +1982,9 @@ dcc_change_nick (struct server *serv, char *oldnick, char *newnick)
 static int
 is_same_file (struct DCC *dcc, struct DCC *new_dcc)
 {
+#ifndef WIN32
 	struct stat st_a, st_b;
+#endif
 
 	/* if it's the same filename, must be same */
 	if (strcmp (dcc->destfile, new_dcc->destfile) == 0)