]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Minor portability fixes
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 9 Jul 2019 09:58:11 +0000 (10:58 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 9 Jul 2019 09:58:11 +0000 (10:58 +0100)
CMakeLists.txt
config.h.in

index de9a543e3a0f969202706becf132436b28992c59..00c34055393ee522c25d42916909ef0255fcc2fb 100644 (file)
@@ -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)
index 8adea82c845e8fe70a28328c00f658f7b6ee66f1..83f8a721c4f526911e03321cf058f30706f42096 100644 (file)
@@ -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__) || \