diff options
Diffstat (limited to 'ACE/ace/INET_Addr.inl')
-rw-r--r-- | ACE/ace/INET_Addr.inl | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ACE/ace/INET_Addr.inl b/ACE/ace/INET_Addr.inl index a05a80db7fb..21d053b7bc5 100644 --- a/ACE/ace/INET_Addr.inl +++ b/ACE/ace/INET_Addr.inl @@ -88,15 +88,13 @@ ACE_INLINE u_short ACE_INET_Addr::get_port_number (void) const { ACE_TRACE ("ACE_INET_Addr::get_port_number"); -#if defined (ACE_LACKS_NTOHS) - ACE_NOTSUP_RETURN (0); -#elif defined (ACE_HAS_IPV6) +#if defined (ACE_HAS_IPV6) if (this->get_type () == PF_INET) - return ntohs (this->inet_addr_.in4_.sin_port); + return ACE_NTOHS (this->inet_addr_.in4_.sin_port); else - return ntohs (this->inet_addr_.in6_.sin6_port); + return ACE_NTOHS (this->inet_addr_.in6_.sin6_port); #else - return ntohs (this->inet_addr_.in4_.sin_port); + return ACE_NTOHS (this->inet_addr_.in4_.sin_port); #endif /* ACE_HAS_IPV6 */ } |