vlc | branch: master | Diego Fernando Nieto <[email protected]> | Sat Nov 10 13:34:28 2012 -0500| [c6fb7802b909b17942b38c8359342237e1cc62ef] | committer: Jean-Baptiste Kempf
contrib: workaround libxml 2.9.0 threads error for OSX Modified-by: Edward Wang <[email protected]> Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c6fb7802b909b17942b38c8359342237e1cc62ef --- contrib/src/libxml2/osx-threads.patch | 19 +++++++++++++++++++ contrib/src/libxml2/rules.mak | 3 +++ 2 files changed, 22 insertions(+) diff --git a/contrib/src/libxml2/osx-threads.patch b/contrib/src/libxml2/osx-threads.patch new file mode 100644 index 0000000..e15352a --- /dev/null +++ b/contrib/src/libxml2/osx-threads.patch @@ -0,0 +1,19 @@ +--- libxml2-2.9.0/threads.c.orig 2012-11-10 08:11:05.000000000 -0500 ++++ libxml2-2.9.0/threads.c 2012-11-10 08:12:30.000000000 -0500 +@@ -146,6 +146,7 @@ + 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 @@ + #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/contrib/src/libxml2/rules.mak b/contrib/src/libxml2/rules.mak index 66ae3a7..b2d24b7 100644 --- a/contrib/src/libxml2/rules.mak +++ b/contrib/src/libxml2/rules.mak @@ -17,6 +17,9 @@ XMLCONF = --with-minimal --with-catalog --with-reader --with-tree --with-push -- libxml2: libxml2-$(LIBXML2_VERSION).tar.gz .sum-libxml2 $(UNPACK) +ifdef HAVE_MACOSX + $(APPLY) $(SRC)/libxml2/osx-threads.patch +endif $(APPLY) $(SRC)/libxml2/no-tests.patch $(APPLY) $(SRC)/libxml2/pthread.patch $(MOVE) _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
