summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabriel Russell <gabriel.russell@mongodb.com>2018-06-14 10:27:17 -0400
committerGabriel Russell <gabriel.russell@mongodb.com>2018-06-14 15:02:28 -0400
commit13c65fa47bc60b785bc9c6a90bd68d5167c34ba7 (patch)
tree3e0042f8eae74ba1576b9ba10d1d14b6061d1619 /src
parenta9ad37bdea390cbf96122382e3a358287b86ac2f (diff)
downloadmongo-13c65fa47bc60b785bc9c6a90bd68d5167c34ba7.tar.gz
SERVER-34006 build android embedded with api version 21
Diffstat (limited to 'src')
-rw-r--r--src/mongo/util/errno_util.cpp2
-rw-r--r--src/third_party/boost-1.60.0/libs/filesystem/src/operations.cpp7
2 files changed, 8 insertions, 1 deletions
diff --git a/src/mongo/util/errno_util.cpp b/src/mongo/util/errno_util.cpp
index fca401aa129..aa6733de737 100644
--- a/src/mongo/util/errno_util.cpp
+++ b/src/mongo/util/errno_util.cpp
@@ -58,7 +58,7 @@ std::string errnoWithDescription(int errNumber) {
char buf[kBuflen];
char* msg{nullptr};
-#if defined(__GNUC__) && defined(_GNU_SOURCE)
+#if defined(__GNUC__) && defined(_GNU_SOURCE) && (__ANDROID_API__ > 22)
msg = strerror_r(errNumber, buf, kBuflen);
#elif defined(_WIN32)
diff --git a/src/third_party/boost-1.60.0/libs/filesystem/src/operations.cpp b/src/third_party/boost-1.60.0/libs/filesystem/src/operations.cpp
index b5e0f661ba6..05f67b6220b 100644
--- a/src/third_party/boost-1.60.0/libs/filesystem/src/operations.cpp
+++ b/src/third_party/boost-1.60.0/libs/filesystem/src/operations.cpp
@@ -11,6 +11,12 @@
//--------------------------------------------------------------------------------------//
// define 64-bit offset macros BEFORE including boost/config.hpp (see ticket #5355)
+//
+// Mongodb modification:
+// Don't mess with _FILE_OFFSET_BITS or __USE_FILE_OFFSET64 on android because
+// it breaks compiling boost against some older android api versions
+//
+#if !(defined(__ANDROID__) && (__ANDROID_API__ < 24))
#if !(defined(__HP_aCC) && defined(_ILP32) && !defined(_STATVFS_ACPP_PROBLEMS_FIXED))
#define _FILE_OFFSET_BITS 64 // at worst, these defines may have no effect,
#endif
@@ -28,6 +34,7 @@
#else
#define _FILE_OFFSET_BITS 64
#endif
+#endif
// define BOOST_FILESYSTEM_SOURCE so that <boost/filesystem/config.hpp> knows
// the library is being built (possibly exporting rather than importing code)