summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SConstruct2
-rw-r--r--src/mongo/crypto/sha_block_openssl.cpp2
-rw-r--r--src/mongo/platform/stack_locator_openbsd.cpp1
-rw-r--r--src/mongo/util/net/ssl_manager.cpp2
-rw-r--r--src/mongo/util/processinfo_openbsd.cpp8
-rwxr-xr-xsrc/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h4
6 files changed, 14 insertions, 5 deletions
diff --git a/SConstruct b/SConstruct
index a9e393d0063..802398f8ef3 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1368,7 +1368,7 @@ if env['_LIBDEPS'] == '$_LIBDEPS_LIBS':
# toolchain, or may be using it for the archiver but not the
# linker, and binutils currently is the olny thing that supports
# thin archives. Don't even try on those platforms.
- if not env.TargetOSIs('solaris', 'darwin', 'windows'):
+ if not env.TargetOSIs('solaris', 'darwin', 'windows', 'openbsd'):
env.Tool('thin_archive')
if env.TargetOSIs('linux', 'freebsd', 'openbsd'):
diff --git a/src/mongo/crypto/sha_block_openssl.cpp b/src/mongo/crypto/sha_block_openssl.cpp
index dce8ca88427..554686e80c2 100644
--- a/src/mongo/crypto/sha_block_openssl.cpp
+++ b/src/mongo/crypto/sha_block_openssl.cpp
@@ -44,7 +44,7 @@
#include <openssl/hmac.h>
#include <openssl/sha.h>
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
namespace {
// Copies of OpenSSL after 1.1.0 define new EVP digest routines. We must
// polyfill used definitions to interact with older OpenSSL versions.
diff --git a/src/mongo/platform/stack_locator_openbsd.cpp b/src/mongo/platform/stack_locator_openbsd.cpp
index 014edeaa247..8355633a18a 100644
--- a/src/mongo/platform/stack_locator_openbsd.cpp
+++ b/src/mongo/platform/stack_locator_openbsd.cpp
@@ -30,6 +30,7 @@
#include "mongo/platform/stack_locator.h"
+#include <pthread.h>
#include <pthread_np.h>
#include <sys/signal.h>
diff --git a/src/mongo/util/net/ssl_manager.cpp b/src/mongo/util/net/ssl_manager.cpp
index 8766d1fed64..6299e1336af 100644
--- a/src/mongo/util/net/ssl_manager.cpp
+++ b/src/mongo/util/net/ssl_manager.cpp
@@ -227,7 +227,7 @@ IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(ASN1_SEQUENCE_ANY, ASN1_SET_ANY, ASN
#endif // MONGO_CONFIG_NEEDS_ASN1_ANY_DEFINITIONS
// clang-format on
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
// Copies of OpenSSL after 1.1.0 define new functions for interaction with
// X509 structure. We must polyfill used definitions to interact with older
// OpenSSL versions.
diff --git a/src/mongo/util/processinfo_openbsd.cpp b/src/mongo/util/processinfo_openbsd.cpp
index fb8ae8437d7..dc3e43d8636 100644
--- a/src/mongo/util/processinfo_openbsd.cpp
+++ b/src/mongo/util/processinfo_openbsd.cpp
@@ -208,4 +208,12 @@ bool ProcessInfo::pagesInMemory(const void* start, size_t numPages, vector<char>
}
return true;
}
+
+// get the number of CPUs available to the scheduler
+boost::optional<unsigned long> ProcessInfo::getNumAvailableCores() {
+ long nprocs = sysconf(_SC_NPROCESSORS_ONLN);
+ if (nprocs)
+ return nprocs;
+ return boost::none;
+}
}
diff --git a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
index 2b3f76db866..20b970834e6 100755
--- a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
+++ b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
@@ -112,7 +112,7 @@ typedef BID_UINT128 _Quad;
#define SQRT80 sqrtl
#else
#define BINARY80 __float80
- //#define BINARY128 __float128
+ //#define BINARY128 __float128
#define BINARY128 BID_UINT128
#define SQRT80 sqrtw
#endif
@@ -159,7 +159,7 @@ typedef unsigned long fexcept_t;
typedef unsigned bid__int64 fexcept_t;
#endif
#else
-#ifdef __QNX__
+#if defined(__QNX__) || defined(__OpenBSD__)
#include <fenv.h>
#else
typedef unsigned short int fexcept_t;