X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/fe1c19dcdfa000c2461e85ed7bf712de49904377..4f5b0756df0dfc925b9576db47ecce949c378e18:/access.c diff --git a/access.c b/access.c index f8dd593f..9def1b2c 100644 --- a/access.c +++ b/access.c @@ -67,7 +67,7 @@ static int match_address(char *addr, char *tok) int gai; int ret = 0; int addrlen = 0; -#if HAVE_STRTOL +#ifdef HAVE_STRTOL long int bits; #else int bits; @@ -88,7 +88,7 @@ static int match_address(char *addr, char *tok) /* Fail quietly if tok is a hostname (not an address) */ if (strspn(tok, ".0123456789") != len -#if INET6 +#ifdef INET6 && strchr(tok, ':') == NULL #endif ) { @@ -133,7 +133,7 @@ static int match_address(char *addr, char *tok) break; -#if INET6 +#ifdef INET6 case PF_INET6: { struct sockaddr_in6 *sin6a, *sin6t; @@ -146,7 +146,7 @@ static int match_address(char *addr, char *tok) addrlen = 16; -#if HAVE_SOCKADDR_IN6_SCOPE_ID +#ifdef HAVE_SOCKADDR_IN6_SCOPE_ID if (sin6t->sin6_scope_id && sin6a->sin6_scope_id != sin6t->sin6_scope_id) { ret = 0; @@ -166,13 +166,13 @@ static int match_address(char *addr, char *tok) bits = -1; if (p) { if (inet_pton(resa->ai_addr->sa_family, p, mask) <= 0) { -#if HAVE_STRTOL +#ifdef HAVE_STRTOL char *ep = NULL; #else unsigned char *pp; #endif -#if HAVE_STRTOL +#ifdef HAVE_STRTOL bits = strtol(p, &ep, 10); if (!*p || *ep) { rprintf(FLOG, "malformed mask in %s\n", tok);