static void __bionic_format_dlerror(const char* msg, const char* detail) { char* buffer = __get_thread()->dlerror_buffer; strlcpy(buffer, msg, __BIONIC_DLERROR_BUFFER_SIZE); if (detail != NULL) { strlcat(buffer, ": ", __BIONIC_DLERROR_BUFFER_SIZE); strlcat(buffer, detail, __BIONIC_DLERROR_BUFFER_SIZE); } __bionic_set_dlerror(buffer); }
const char* dlerror() { const char* old_value = __bionic_set_dlerror(NULL); return old_value; }
const char* dlerror() { const char* old_value = __bionic_set_dlerror(nullptr); return old_value; }