mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-28 23:14:57 +03:00
threads: Fix crash with weak pthread symbols
Regressed in 7010d877. Should fix #488.
This commit is contained in:
@@ -752,6 +752,8 @@ xmlInitThreadsInternal(void)
|
||||
*/
|
||||
if (libxml_is_threaded == -1)
|
||||
libxml_is_threaded = (pthread_mutex_lock != NULL);
|
||||
if (libxml_is_threaded == 0)
|
||||
return;
|
||||
#endif /* XML_PTHREAD_WEAK */
|
||||
pthread_key_create(&globalkey, xmlFreeGlobalState);
|
||||
mainthread = pthread_self();
|
||||
|
||||
Reference in New Issue
Block a user