diff options
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/bio/bio_addr.c | 12 | ||||
-rw-r--r-- | crypto/bio/bio_local.h | 2 | ||||
-rw-r--r-- | crypto/bio/bss_acpt.c | 4 | ||||
-rw-r--r-- | crypto/bio/bss_conn.c | 4 |
4 files changed, 11 insertions, 11 deletions
diff --git a/crypto/bio/bio_addr.c b/crypto/bio/bio_addr.c index a80774bbd7..c3f7567a58 100644 --- a/crypto/bio/bio_addr.c +++ b/crypto/bio/bio_addr.c @@ -83,7 +83,7 @@ int BIO_ADDR_make(BIO_ADDR *ap, const struct sockaddr *sa) memcpy(&(ap->s_in), sa, sizeof(struct sockaddr_in)); return 1; } -#ifdef AF_INET6 +#if OPENSSL_USE_IPV6 if (sa->sa_family == AF_INET6) { memcpy(&(ap->s_in6), sa, sizeof(struct sockaddr_in6)); return 1; @@ -122,7 +122,7 @@ int BIO_ADDR_rawmake(BIO_ADDR *ap, int family, ap->s_in.sin_addr = *(struct in_addr *)where; return 1; } -#ifdef AF_INET6 +#if OPENSSL_USE_IPV6 if (family == AF_INET6) { if (wherelen != sizeof(struct in6_addr)) return 0; @@ -151,7 +151,7 @@ int BIO_ADDR_rawaddress(const BIO_ADDR *ap, void *p, size_t *l) len = sizeof(ap->s_in.sin_addr); addrptr = &ap->s_in.sin_addr; } -#ifdef AF_INET6 +#if OPENSSL_USE_IPV6 else if (ap->sa.sa_family == AF_INET6) { len = sizeof(ap->s_in6.sin6_addr); addrptr = &ap->s_in6.sin6_addr; @@ -180,7 +180,7 @@ unsigned short BIO_ADDR_rawport(const BIO_ADDR *ap) { if (ap->sa.sa_family == AF_INET) return ap->s_in.sin_port; -#ifdef AF_INET6 +#if OPENSSL_USE_IPV6 if (ap->sa.sa_family == AF_INET6) return ap->s_in6.sin6_port; #endif @@ -334,7 +334,7 @@ socklen_t BIO_ADDR_sockaddr_size(const BIO_ADDR *ap) { if (ap->sa.sa_family == AF_INET) return sizeof(ap->s_in); -#ifdef AF_INET6 +#if OPENSSL_USE_IPV6 if (ap->sa.sa_family == AF_INET6) return sizeof(ap->s_in6); #endif @@ -656,7 +656,7 @@ int BIO_lookup_ex(const char *host, const char *service, int lookup_type, switch(family) { case AF_INET: -#ifdef AF_INET6 +#if OPENSSL_USE_IPV6 case AF_INET6: #endif #ifdef AF_UNIX diff --git a/crypto/bio/bio_local.h b/crypto/bio/bio_local.h index 6ba0196ce6..fcabc7b9cd 100644 --- a/crypto/bio/bio_local.h +++ b/crypto/bio/bio_local.h @@ -73,7 +73,7 @@ struct bio_addrinfo_st { union bio_addr_st { struct sockaddr sa; -# ifdef AF_INET6 +# if OPENSSL_USE_IPV6 struct sockaddr_in6 s_in6; # endif struct sockaddr_in s_in; diff --git a/crypto/bio/bss_acpt.c b/crypto/bio/bss_acpt.c index 1cda967335..363f5ac173 100644 --- a/crypto/bio/bss_acpt.c +++ b/crypto/bio/bss_acpt.c @@ -188,7 +188,7 @@ static int acpt_state(BIO *b, BIO_ACCEPT *c) * at least the "else" part will always be * compiled. */ -#ifdef AF_INET6 +#if OPENSSL_USE_IPV6 family = AF_INET6; } else { #endif @@ -497,7 +497,7 @@ static long acpt_ctrl(BIO *b, int cmd, long num, void *ptr) *pp = data->cache_peer_serv; } else if (num == 4) { switch (BIO_ADDRINFO_family(data->addr_iter)) { -#ifdef AF_INET6 +#if OPENSSL_USE_IPV6 case AF_INET6: ret = BIO_FAMILY_IPV6; break; diff --git a/crypto/bio/bss_conn.c b/crypto/bio/bss_conn.c index 0d91f25fe7..2247678ae0 100644 --- a/crypto/bio/bss_conn.c +++ b/crypto/bio/bss_conn.c @@ -105,7 +105,7 @@ static int conn_state(BIO *b, BIO_CONNECT *c) * at least the "else" part will always be * compiled. */ -#ifdef AF_INET6 +#if OPENSSL_USE_IPV6 family = AF_INET6; } else { #endif @@ -422,7 +422,7 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr) *pptr = (const char *)BIO_ADDRINFO_address(data->addr_iter); } else if (num == 3) { switch (BIO_ADDRINFO_family(data->addr_iter)) { -# ifdef AF_INET6 +# if OPENSSL_USE_IPV6 case AF_INET6: ret = BIO_FAMILY_IPV6; break; |