commit 8c9192d: [Minor] Minor portability fixes
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Jul 9 10:00:06 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-07-09 10:58:11 +0100
URL: https://github.com/rspamd/rspamd/commit/8c9192d649279aff7a6f10998580a6c47682f165 (HEAD -> master)
[Minor] Minor portability fixes
---
CMakeLists.txt | 2 --
config.h.in | 8 ++++++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index de9a543e3..00c340553 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,8 +24,6 @@ SET(RSPAMD_VERSION "${RSPAMD_VERSION_MAJOR}.${RSPAMD_VERSION_MINOR}")
PROJECT(rspamd VERSION "${RSPAMD_VERSION}" LANGUAGES C CXX ASM)
# This is supported merely with cmake 3.1
-SET(CMAKE_CXX_STANDARD 17)
-SET(CMAKE_CXX_STANDARD_REQUIRED ON)
SET(USE_CXX_LINKER 1)
SET(CMAKE_C_STANDARD 11)
diff --git a/config.h.in b/config.h.in
index 8adea82c8..83f8a721c 100644
--- a/config.h.in
+++ b/config.h.in
@@ -376,8 +376,16 @@ typedef off_t goffset;
# define NBYTES(nbits) (((nbits) + BITSPERBYTE - 1) / BITSPERBYTE)
#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
extern uint64_t ottery_rand_uint64(void);
#define UCL_RANDOM_FUNCTION ottery_rand_uint64()
+#ifdef __cplusplus
+}
+#endif
+
/* Disable slab allocator if jemalloc is already in the system */
#if defined(WITH_JEMALLOC) || defined(__FreeBSD__) || \
More information about the Commits
mailing list