diff options
author | Andy Polyakov <appro@openssl.org> | 2012-08-14 09:53:41 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2012-08-14 09:53:41 +0000 |
commit | ae9299464557db7ae4b1e78b229eb38eea24a26c (patch) | |
tree | f5b40164754095f31ec816c40fd4ce82b26b4b5b /crypto/bio | |
parent | c4aa6b041b68d378537fa261ec1e95c72e98faae (diff) |
bss_dgram.c: fix compilation failure and warning on Windows with
contemporary SDK [from HEAD].
Diffstat (limited to 'crypto/bio')
-rw-r--r-- | crypto/bio/bss_dgram.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c index 3b251ba8d8..7b87a043c4 100644 --- a/crypto/bio/bss_dgram.c +++ b/crypto/bio/bss_dgram.c @@ -81,6 +81,10 @@ #define IP_MTU 14 /* linux is lame */ #endif +#if OPENSSL_USE_IPV6 && !defined(IPPROTO_IPV6) +#define IPPROTO_IPV6 41 /* windows is lame */ +#endif + #if defined(__FreeBSD__) && defined(IN6_IS_ADDR_V4MAPPED) /* Standard definition causes type-punning problems. */ #undef IN6_IS_ADDR_V4MAPPED @@ -874,7 +878,7 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr) case AF_INET6: #if defined(IPV6_DONTFRAG) if ((ret = setsockopt(b->num, IPPROTO_IPV6, IPV6_DONTFRAG, - &sockopt_val, sizeof(sockopt_val))) < 0) + (const void *)&sockopt_val, sizeof(sockopt_val))) < 0) { perror("setsockopt"); ret = -1; } #elif defined(OPENSSL_SYS_LINUX) && defined(IPV6_MTUDISCOVER) if ((sockopt_val = num ? IP_PMTUDISC_PROBE : IP_PMTUDISC_DONT), |