asan: fix odr-violation
authorMichael Wallner <mike@php.net>
Tue, 29 Sep 2020 11:11:01 +0000 (13:11 +0200)
committerMichael Wallner <mike@php.net>
Tue, 29 Sep 2020 11:11:01 +0000 (13:11 +0200)
src/libmemcached/sasl.cc
src/libmemcachedprotocol/CMakeLists.txt
src/libmemcachedutil/CMakeLists.txt

index 021cf3fbad4ccdc764b86f43a60a21c57d1dd2f3..d8247bd146e7b12344e5224e740a7963ec32c1a4 100644 (file)
@@ -122,7 +122,7 @@ static void sasl_shutdown_function()
 }
 
 static std::atomic<int> 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)
 {
index 14967dd55e0efa602e2d29295b375a6f15b954bc..84b7fa1fb9687f1822c32373869487423848ce76 100644 (file)
@@ -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
index 56fb0b0867ff8da6b52452af70da520038623278..e1834f265070a7a15681ae65c2eba10c02a8aed7 100644 (file)
@@ -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