From: Michael Wallner Date: Tue, 29 Sep 2020 11:11:01 +0000 (+0200) Subject: asan: fix odr-violation X-Git-Tag: 1.1.0-beta1~236^2~38 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=0c4fefba6fa21b736a027cde2633c226130a1932;p=m6w6%2Flibmemcached asan: fix odr-violation --- diff --git a/src/libmemcached/sasl.cc b/src/libmemcached/sasl.cc index 021cf3fb..d8247bd1 100644 --- a/src/libmemcached/sasl.cc +++ b/src/libmemcached/sasl.cc @@ -122,7 +122,7 @@ static void sasl_shutdown_function() } static std::atomic sasl_startup_state(SASL_OK); -pthread_mutex_t sasl_startup_state_LOCK= PTHREAD_MUTEX_INITIALIZER; +static pthread_mutex_t sasl_startup_state_LOCK= PTHREAD_MUTEX_INITIALIZER; static pthread_once_t sasl_startup_once= PTHREAD_ONCE_INIT; static void sasl_startup_function(void) { diff --git a/src/libmemcachedprotocol/CMakeLists.txt b/src/libmemcachedprotocol/CMakeLists.txt index 14967dd5..84b7fa1f 100644 --- a/src/libmemcachedprotocol/CMakeLists.txt +++ b/src/libmemcachedprotocol/CMakeLists.txt @@ -14,7 +14,7 @@ set_target_properties(libmemcachedprotocol PROPERTIES SOVERSION ${LIBMEMCACHEDPROTOCOL_SO_VERSION} VERSION v${LIBMEMCACHEDPROTOCOL_VERSION}) target_compile_definitions(libmemcachedprotocol PRIVATE -DBUILDING_LIBMEMCACHED) -target_link_libraries(libmemcachedprotocol PUBLIC libmemcached Threads::Threads) +target_link_libraries(libmemcachedprotocol PUBLIC Threads::Threads) target_include_directories(libmemcachedprotocol PRIVATE ${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR}/src diff --git a/src/libmemcachedutil/CMakeLists.txt b/src/libmemcachedutil/CMakeLists.txt index 56fb0b08..e1834f26 100644 --- a/src/libmemcachedutil/CMakeLists.txt +++ b/src/libmemcachedutil/CMakeLists.txt @@ -15,7 +15,7 @@ set_target_properties(libmemcachedutil PROPERTIES SOVERSION ${LIBMEMCACHEDUTIL_SO_VERSION} VERSION v${LIBMEMCACHEDUTIL_VERSION}) target_compile_definitions(libmemcachedutil PRIVATE -DBUILDING_LIBMEMCACHED) -target_link_libraries(libmemcachedutil PUBLIC libmemcached Threads::Threads) +target_link_libraries(libmemcachedutil PUBLIC Threads::Threads) target_include_directories(libmemcachedutil PRIVATE ${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR}/src