diff options
author | Steve Huston <shuston@riverace.com> | 2018-03-09 16:02:04 -0500 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2018-03-09 16:02:04 -0500 |
commit | 168208dfd6bb859a48a7470730127de8cc22c639 (patch) | |
tree | dbedc729a89cbb1d76d87b79a882c1aa315258c7 /ACE/ace | |
parent | 132c6df724b3f4d82ade1b6a73fd86d4c240bb20 (diff) | |
download | ATCD-168208dfd6bb859a48a7470730127de8cc22c639.tar.gz |
Remove preproc checks - if ACE_HAS_IPV6 is set, the IPV^ defs should be there too.fix-ipv6only-handling
Diffstat (limited to 'ACE/ace')
-rw-r--r-- | ACE/ace/SOCK_Acceptor.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/ACE/ace/SOCK_Acceptor.cpp b/ACE/ace/SOCK_Acceptor.cpp index 12311129ee0..47057df08d3 100644 --- a/ACE/ace/SOCK_Acceptor.cpp +++ b/ACE/ace/SOCK_Acceptor.cpp @@ -227,7 +227,7 @@ ACE_SOCK_Acceptor::shared_open (const ACE_Addr &local_sap, ACE_TRACE ("ACE_SOCK_Acceptor::shared_open"); int error = 0; -#if !defined (ACE_HAS_IPV6) || (!defined (IPPROTO_IPV6) || !defined (IPV6_V6ONLY)) +#if !defined (ACE_HAS_IPV6) ACE_UNUSED_ARG (ipv6_only); #else /* defined (ACE_HAS_IPV6) */ if (protocol_family == PF_INET6) @@ -253,7 +253,6 @@ ACE_SOCK_Acceptor::shared_open (const ACE_Addr &local_sap, * This must be done before attempting to bind the address. * On Windows older than Vista this will fail. */ -# if defined (IPPROTO_IPV6) && defined (IPV6_V6ONLY) int setting = !!ipv6_only; if (-1 == ACE_OS::setsockopt (this->get_handle (), IPPROTO_IPV6, @@ -262,17 +261,16 @@ ACE_SOCK_Acceptor::shared_open (const ACE_Addr &local_sap, sizeof (setting))) error = 1; else -# endif /* IPPROTO_V6 && IPV6_ONLY */ - // We probably don't need a bind_port written here. - // There are currently no supported OS's that define - // ACE_LACKS_WILDCARD_BIND. - if (ACE_OS::bind (this->get_handle (), - reinterpret_cast<sockaddr *> (&local_inet6_addr), - sizeof local_inet6_addr) == -1) - error = 1; + // We probably don't need a bind_port written here. + // There are currently no supported OS's that define + // ACE_LACKS_WILDCARD_BIND. + if (ACE_OS::bind (this->get_handle (), + reinterpret_cast<sockaddr *> (&local_inet6_addr), + sizeof local_inet6_addr) == -1) + error = 1; } else -#endif +#endif /* ACE_HAS_IPV6 */ if (protocol_family == PF_INET) { sockaddr_in local_inet_addr; |