summaryrefslogtreecommitdiff
path: root/ACE/tests/SOCK_Connector_Test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/tests/SOCK_Connector_Test.cpp')
-rw-r--r--ACE/tests/SOCK_Connector_Test.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/ACE/tests/SOCK_Connector_Test.cpp b/ACE/tests/SOCK_Connector_Test.cpp
index e419aeaab2c..cc878c5da5f 100644
--- a/ACE/tests/SOCK_Connector_Test.cpp
+++ b/ACE/tests/SOCK_Connector_Test.cpp
@@ -20,7 +20,9 @@
#include "ace/OS_NS_sys_utsname.h"
#include "ace/OS_NS_netdb.h"
-
+#if defined(ACE_LACKS_GETHOSTENT) || defined(ACE_LACKS_SETHOSTENT) || defined(ACE_LACKS_ENDHOSTENT)
+# define MISSING_HOSTENT_FUNCTIONS
+#endif
// Host candidate list
struct Host_Candidate
@@ -31,7 +33,7 @@ struct Host_Candidate
const int MAX_CANDIDATES = 50;
Host_Candidate candidate[MAX_CANDIDATES];
-#if !defined (ACE_LACKS_GETHOSTENT)
+#ifndef MISSING_HOSTENT_FUNCTIONS
// Determine if a host exists, is reachable, and is up. Attempt a
// blocking connection to it; if it succeeds, then the host exists, is
// reachable, and is up.
@@ -74,7 +76,7 @@ find_another_host (ACE_TCHAR other_host[])
ACE_OS::strcpy (other_host,
ACE_DEFAULT_SERVER_HOST); // If all else fails
-#if !defined (ACE_LACKS_GETHOSTENT)
+#ifndef MISSING_HOSTENT_FUNCTIONS
// These gethost-type things don't work everywhere.
struct hostent *h = 0;
ACE_utsname un;