X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/3723efcb1d5ff37771174f9b90aee40b438f34e6..d3f5c628d7bdec6f7334bbae68a7bee1f5285815:/lib/inet_pton.c diff --git a/lib/inet_pton.c b/lib/inet_pton.c index 41884aff..4a0be885 100644 --- a/lib/inet_pton.c +++ b/lib/inet_pton.c @@ -27,10 +27,12 @@ */ static int inet_pton4(const char *src, unsigned char *dst); +#ifdef INET6 static int inet_pton6(const char *src, unsigned char *dst); +#endif /* int - * isc_net_pton(af, src, dst) + * inet_pton(af, src, dst) * convert from presentation format (which usually means ASCII printable) * to network format (which is usually some kind of binary format). * return: @@ -41,16 +43,17 @@ static int inet_pton6(const char *src, unsigned char *dst); * Paul Vixie, 1996. */ int -isc_net_pton(af, src, dst) - int af; - const char *src; - void *dst; +inet_pton(int af, + const char *src, + void *dst) { switch (af) { case AF_INET: return (inet_pton4(src, dst)); +#ifdef INET6 case AF_INET6: return (inet_pton6(src, dst)); +#endif default: errno = EAFNOSUPPORT; return (-1); @@ -121,6 +124,7 @@ inet_pton4(src, dst) * author: * Paul Vixie, 1996. */ +#ifdef INET6 static int inet_pton6(src, dst) const char *src; @@ -205,3 +209,4 @@ inet_pton6(src, dst) memcpy(dst, tmp, NS_IN6ADDRSZ); return (1); } +#endif