diff --git a/libcoz/real.cpp b/libcoz/real.cpp index 8e7c063..057acd9 100644 --- a/libcoz/real.cpp +++ b/libcoz/real.cpp @@ -6,6 +6,7 @@ */ #include "real.h" +#include "ccutil/log.h" #include @@ -37,6 +38,7 @@ static void* pthread_handle = NULL; //< The `dlopen` handle to libpthread static void* get_pthread_handle() { if(pthread_handle == NULL && !__atomic_exchange_n(&in_dlopen, true, __ATOMIC_ACQ_REL)) { pthread_handle = dlopen("libpthread.so.0", RTLD_NOW | RTLD_GLOBAL); + REQUIRE(pthread_handle != NULL) << dlerror(); __atomic_store_n(&in_dlopen, false, __ATOMIC_RELEASE); }