1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 12:25:09 +03:00

fix: pthread weak references in globals.c

Linking executables will fail on systems with glibc < 2.34 without
declaring these symbols as weak references.

In commit c19771c1f1 these references
were moved to globals.c from threads.c, but the `#pragma weak`
declarations were lost in the process.

Also removing unneeded weak declarations from threads.c.
This commit is contained in:
Mike Dalessio 2023-11-18 12:21:38 -05:00 committed by Nick Wellnhofer
parent fab8458458
commit b9e5c11011
2 changed files with 5 additions and 2 deletions

View File

@ -118,6 +118,11 @@ static XML_THREAD_LOCAL xmlGlobalState globalState;
defined(__GLIBC__) && \
__GLIBC__ * 100 + __GLIBC_MINOR__ < 234
#pragma weak pthread_getspecific
#pragma weak pthread_setspecific
#pragma weak pthread_key_create
#pragma weak pthread_key_delete
#define XML_PTHREAD_WEAK
static int libxml_is_threaded = -1;

View File

@ -78,8 +78,6 @@
#pragma weak pthread_cond_wait
#pragma weak pthread_equal
#pragma weak pthread_self
#pragma weak pthread_key_create
#pragma weak pthread_key_delete
#pragma weak pthread_cond_signal
#define XML_PTHREAD_WEAK