Skip to content

Instantly share code, notes, and snippets.

@spetrunia
Created March 29, 2021 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spetrunia/54ab8b49f3d80b7f9e577a45eacc311f to your computer and use it in GitHub Desktop.
Save spetrunia/54ab8b49f3d80b7f9e577a45eacc311f to your computer and use it in GitHub Desktop.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b1ad256a4af..11119e496c5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -369,6 +369,7 @@ INCLUDE(configure.cmake)
# Always use USE_MYSYS_NEW
ADD_DEFINITIONS(-DUSE_MYSYS_NEW)
+SET(USING_MYSYS_NEW ON)
# Find header files from the bundled libraries
# (wolfssl, readline, pcre2, etc)
diff --git a/storage/rocksdb/build_rocksdb.cmake b/storage/rocksdb/build_rocksdb.cmake
index 5047e073751..fe7c453498d 100644
--- a/storage/rocksdb/build_rocksdb.cmake
+++ b/storage/rocksdb/build_rocksdb.cmake
@@ -148,7 +148,7 @@ int main() {
endif()
CHECK_FUNCTION_EXISTS(malloc_usable_size HAVE_MALLOC_USABLE_SIZE)
-if(HAVE_MALLOC_USABLE_SIZE)
+if(HAVE_MALLOC_USABLE_SIZE AND NOT USING_MYSYS_NEW)
add_definitions(-DROCKSDB_MALLOC_USABLE_SIZE)
endif()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment