From e7f723539d39f20092aabfb5b51826807e016fe3 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sat, 21 Jul 2012 14:26:19 +0200 Subject: Some aid for compiler warnings --- src/common/dcc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/common/dcc.c') 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 +#include #else #include #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) -- cgit 1.4.1