1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-23 02:50:08 +03:00

fix: more pthread weak references in globals.c

This commit is contained in:
Mike Dalessio 2023-11-18 14:21:45 -05:00
parent 1ac88300c1
commit 62d318f86c
No known key found for this signature in database
GPG Key ID: FCF96ED17542E12F

View File

@ -122,6 +122,8 @@ static XML_THREAD_LOCAL xmlGlobalState globalState;
#pragma weak pthread_setspecific
#pragma weak pthread_key_create
#pragma weak pthread_key_delete
#pragma weak pthread_equal
#pragma weak pthread_self
#define XML_PTHREAD_WEAK
@ -571,7 +573,13 @@ void xmlInitGlobalsInternal(void) {
(pthread_getspecific != NULL) &&
(pthread_setspecific != NULL) &&
(pthread_key_create != NULL) &&
(pthread_key_delete != NULL);
(pthread_key_delete != NULL) &&
/*
* pthread_equal can be inline, resuting in -Waddress warnings.
* Let's assume it's available if all the other functions are.
*/
/* (pthread_equal != NULL) && */
(pthread_self != NULL);
if (libxml_is_threaded == 0)
return;
#endif /* XML_PTHREAD_WEAK */