summaryrefslogtreecommitdiff
path: root/ACE/tests
diff options
context:
space:
mode:
authorFred Hornsey <hornseyf@objectcomputing.com>2019-01-19 23:45:49 -0600
committerFred Hornsey <hornseyf@objectcomputing.com>2019-01-19 23:45:49 -0600
commit709a23441a1e90b4689c1cfa9e5e745431c8939e (patch)
treeee8eb738b3667b87444eae8c852424b0052207aa /ACE/tests
parent40af509ec08305295db1db5e8c4ed6b74eb13ec8 (diff)
downloadATCD-709a23441a1e90b4689c1cfa9e5e745431c8939e.tar.gz
Fixes for ACE Tests on Android
Diffstat (limited to 'ACE/tests')
-rw-r--r--ACE/tests/Chrono_Test.cpp4
-rw-r--r--ACE/tests/MM_Shared_Memory_Test.cpp1
-rw-r--r--ACE/tests/SOCK_Connector_Test.cpp8
3 files changed, 9 insertions, 4 deletions
diff --git a/ACE/tests/Chrono_Test.cpp b/ACE/tests/Chrono_Test.cpp
index 7d9d0a10d9e..6cde2a4a2d0 100644
--- a/ACE/tests/Chrono_Test.cpp
+++ b/ACE/tests/Chrono_Test.cpp
@@ -208,7 +208,9 @@ test_streamers ()
std::chrono::seconds day_test_ts { day_test_h+day_test_s };
std::chrono::microseconds day_test_tus { day_test_ms+day_test_us };
ACE_Time_Value const test_day {
- ACE_Time_Value { day_test_ts.count (), ACE_Utils::truncate_cast<suseconds_t>(day_test_tus.count ()) }};
+ ACE_Time_Value {
+ ACE_Utils::truncate_cast<time_t>(day_test_ts.count ()),
+ ACE_Utils::truncate_cast<suseconds_t>(day_test_tus.count ())}};
constexpr int expected_min {nr_hours * 60};
constexpr int64_t expected_sec { expected_min * 60 + 54 };
diff --git a/ACE/tests/MM_Shared_Memory_Test.cpp b/ACE/tests/MM_Shared_Memory_Test.cpp
index e7e24e06623..db216a8d12e 100644
--- a/ACE/tests/MM_Shared_Memory_Test.cpp
+++ b/ACE/tests/MM_Shared_Memory_Test.cpp
@@ -22,6 +22,7 @@
#include "ace/Lib_Find.h"
#include "ace/OS_NS_string.h"
#include "ace/OS_NS_unistd.h"
+#include "ace/ACE.h"
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;