diff options
author | Mike Hommey <glandium@debian.org> | 2010-11-05 08:17:59 +0100 |
---|---|---|
committer | Mike Hommey <glandium@debian.org> | 2010-11-05 08:17:59 +0100 |
commit | 2d1849b271fa8697b88d07ba7d78dc83591e1363 (patch) | |
tree | ea10e1d707176e335e17cce9ae634cedfe0d5135 /threads.c | |
parent | eb5d521a2df72fa829a7f8196b957c696e7ccc58 (diff) | |
download | libxml2-2d1849b271fa8697b88d07ba7d78dc83591e1363.tar.gz |
Import upstream version 2.7.8upstream/2.7.8.dfsg
Diffstat (limited to 'threads.c')
-rw-r--r-- | threads.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -439,7 +439,8 @@ __xmlGlobalInitMutexLock(void) /* Make sure the global init lock is initialized and then lock it. */ #ifdef HAVE_PTHREAD_H /* The mutex is statically initialized, so we just lock it. */ - pthread_mutex_lock(&global_init_lock); + if (pthread_mutex_lock) + pthread_mutex_lock(&global_init_lock); #elif defined HAVE_WIN32_THREADS LPCRITICAL_SECTION cs; @@ -508,7 +509,8 @@ void __xmlGlobalInitMutexUnlock(void) { #ifdef HAVE_PTHREAD_H - pthread_mutex_unlock(&global_init_lock); + if (pthread_mutex_unlock) + pthread_mutex_unlock(&global_init_lock); #elif defined HAVE_WIN32_THREADS if (global_init_lock != NULL) { LeaveCriticalSection(global_init_lock); |