From: Wayne Davison Date: Wed, 17 Jun 2020 05:40:55 +0000 (-0700) Subject: Some fixes after compiling on cygwin. X-Git-Tag: v3.2.0pre3~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2c681b874e181bac740d208daf158fd76d9023b6;p=thirdparty%2Frsync.git Some fixes after compiling on cygwin. --- diff --git a/clientname.c b/clientname.c index 05f14ed7..1e85c84e 100644 --- a/clientname.c +++ b/clientname.c @@ -388,7 +388,7 @@ static int compare_addrinfo_sockaddr(const struct addrinfo *ai, const struct soc sin1 = (const struct sockaddr_in6 *) ss; sin2 = (const struct sockaddr_in6 *) ai->ai_addr; - if (ai->ai_addrlen < sizeof (struct sockaddr_in6)) { + if (ai->ai_addrlen < (int)sizeof (struct sockaddr_in6)) { rprintf(FLOG, "%s: too short sockaddr_in6; length=%d\n", fn, (int)ai->ai_addrlen); return 1; diff --git a/options.c b/options.c index 787222a1..2e8731ab 100644 --- a/options.c +++ b/options.c @@ -200,8 +200,11 @@ int list_only = 0; char *batch_name = NULL; int need_unsorted_flist = 0; +char *iconv_opt = #ifdef ICONV_OPTION -char *iconv_opt = ICONV_OPTION; + ICONV_OPTION; +#else + NULL; #endif struct chmod_mode_struct *chmod_modes = NULL; @@ -308,9 +311,7 @@ static int refused_partial, refused_progress, refused_delete_before; static int refused_delete_during; static int refused_inplace, refused_no_iconv; static BOOL usermap_via_chown, groupmap_via_chown; -#ifdef HAVE_SETVBUF static char *outbuf_mode; -#endif static char *bwlimit_arg, *max_size_arg, *min_size_arg; static char tmp_partialdir[] = ".~tmp~"; diff --git a/rsync.c b/rsync.c index 2a8f39cc..e091cbef 100644 --- a/rsync.c +++ b/rsync.c @@ -57,12 +57,6 @@ extern struct chmod_mode_struct *daemon_chmod_modes; extern char *iconv_opt; #endif -#ifdef ICONV_CONST -iconv_t ic_chck = (iconv_t)-1; -# ifdef ICONV_OPTION -iconv_t ic_send = (iconv_t)-1, ic_recv = (iconv_t)-1; -# endif - #define UPDATED_OWNER (1<<0) #define UPDATED_GROUP (1<<1) #define UPDATED_MTIME (1<<2) @@ -72,6 +66,12 @@ iconv_t ic_send = (iconv_t)-1, ic_recv = (iconv_t)-1; #define UPDATED_TIMES (UPDATED_MTIME|UPDATED_ATIME) +#ifdef ICONV_CONST +iconv_t ic_chck = (iconv_t)-1; +# ifdef ICONV_OPTION +iconv_t ic_send = (iconv_t)-1, ic_recv = (iconv_t)-1; +# endif + static const char *default_charset(void) { # if defined HAVE_LIBCHARSET_H && defined HAVE_LOCALE_CHARSET