summaryrefslogtreecommitdiff
path: root/ace/INET_Addr.cpp
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1996-12-18 22:19:36 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1996-12-18 22:19:36 +0000
commitef0b5ea4e04db75a7ea75edfd021e2c02d60e3f4 (patch)
tree7dfba1e847dd22de15bdf789352a439e96669092 /ace/INET_Addr.cpp
parent487a72344828346c66759ac16c771ad881f2cdad (diff)
downloadATCD-ef0b5ea4e04db75a7ea75edfd021e2c02d60e3f4.tar.gz
more VxWorks gethostbyname () tweaks
Diffstat (limited to 'ace/INET_Addr.cpp')
-rw-r--r--ace/INET_Addr.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/ace/INET_Addr.cpp b/ace/INET_Addr.cpp
index 9cc37738029..09ef23182c5 100644
--- a/ace/INET_Addr.cpp
+++ b/ace/INET_Addr.cpp
@@ -187,8 +187,7 @@ ACE_INET_Addr::set (u_short port_number,
else
{
#if defined (VXWORKS)
- int address = ::hostGetByName ((char *) host_name);
- return this->set (port_number, encode ? ntohl (address) : address, encode);
+ hostent *hp = ACE_OS::gethostbyname (host_name);
#else
hostent hentry;
ACE_HOSTENT_DATA buf;
@@ -196,6 +195,7 @@ ACE_INET_Addr::set (u_short port_number,
hostent *hp = ACE_OS::gethostbyname_r (host_name, &hentry,
buf, &error);
+#endif /* VXWORKS */
if (hp == 0)
{
@@ -207,7 +207,6 @@ ACE_INET_Addr::set (u_short port_number,
(void) ACE_OS::memcpy ((void *) &addr, hp->h_addr, hp->h_length);
return this->set (port_number, encode ? ntohl (addr) : addr, encode);
}
-#endif /* VXWORKS */
}
}