summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorAron Xu <aron@debian.org>2012-09-23 16:53:18 +0800
committerAron Xu <aron@debian.org>2012-09-23 16:53:18 +0800
commitc0e3749185e5f464ea6905f63143622bcce78e7f (patch)
tree184401e382f1c953a7db09729ef2463cd72c98a3 /debian
parentadce60d137a56dfa0db360ebd6d6140e0278a81d (diff)
downloadlibxml2-c0e3749185e5f464ea6905f63143622bcce78e7f.tar.gz
Fix a thread portability problemdebian/2.9.0+dfsg1-2
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog7
-rw-r--r--debian/patches/0003-Fix-a-thread-portability-problem.patch34
-rw-r--r--debian/patches/series1
3 files changed, 42 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 333a933..21ad664 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+libxml2 (2.9.0+dfsg1-2) experimental; urgency=low
+
+ * Fix a thread portability problem by cherry-picking upstream
+ patch (Closes: #688473).
+
+ -- Aron Xu <aron@debian.org> Sun, 23 Sep 2012 16:50:12 +0800
+
libxml2 (2.9.0+dfsg1-1) experimental; urgency=low
* New upstream release.
diff --git a/debian/patches/0003-Fix-a-thread-portability-problem.patch b/debian/patches/0003-Fix-a-thread-portability-problem.patch
new file mode 100644
index 0000000..07e3583
--- /dev/null
+++ b/debian/patches/0003-Fix-a-thread-portability-problem.patch
@@ -0,0 +1,34 @@
+From: Friedrich Haubensak <hsk@fli-leibniz.de>
+Date: Wed, 12 Sep 2012 17:34:53 +0200
+Subject: Fix a thread portability problem
+
+cannot compile libxml2-2.9.0 using studio 12.1 compiler on solaris 10
+
+I.M.O. structure initializer (as PTHREAD_ONCE_INIT) cannot be used in
+a structure assignment anyway
+---
+ threads.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/threads.c b/threads.c
+index f206149..7e85a26 100644
+--- a/threads.c
++++ b/threads.c
+@@ -146,6 +146,7 @@ struct _xmlRMutex {
+ static pthread_key_t globalkey;
+ static pthread_t mainthread;
+ static pthread_once_t once_control = PTHREAD_ONCE_INIT;
++static pthread_once_t once_control_init = PTHREAD_ONCE_INIT;
+ static pthread_mutex_t global_init_lock = PTHREAD_MUTEX_INITIALIZER;
+ #elif defined HAVE_WIN32_THREADS
+ #if defined(HAVE_COMPILER_TLS)
+@@ -915,7 +916,7 @@ xmlCleanupThreads(void)
+ #ifdef HAVE_PTHREAD_H
+ if ((libxml_is_threaded) && (pthread_key_delete != NULL))
+ pthread_key_delete(globalkey);
+- once_control = PTHREAD_ONCE_INIT;
++ once_control = once_control_init;
+ #elif defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
+ if (globalkey != TLS_OUT_OF_INDEXES) {
+ xmlGlobalStateCleanupHelperParams *p;
+--
diff --git a/debian/patches/series b/debian/patches/series
index 9df6060..7738ca3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
0001-modify-xml2-config-and-pkgconfig-behaviour.patch
0002-rand_seed-should-be-static-in-dict.c.patch
+0003-Fix-a-thread-portability-problem.patch