summaryrefslogtreecommitdiff
path: root/user/exiv2/0000-pthread-init-fix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/exiv2/0000-pthread-init-fix.patch')
-rw-r--r--user/exiv2/0000-pthread-init-fix.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/user/exiv2/0000-pthread-init-fix.patch b/user/exiv2/0000-pthread-init-fix.patch
new file mode 100644
index 000000000..ac69b14c1
--- /dev/null
+++ b/user/exiv2/0000-pthread-init-fix.patch
@@ -0,0 +1,29 @@
+From 620ef04e96f4c0d0894d976fc361588b6526a116 Mon Sep 17 00:00:00 2001
+From: clanmills <robin@clanmills.com>
+Date: Tue, 20 Jun 2017 20:41:30 +0100
+Subject: [PATCH] https://github.com/Exiv2/exiv2/issues/9 Fix submitted.
+
+---
+ src/actions.cpp | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/actions.cpp b/src/actions.cpp
+index 0ebe8505..17444c5b 100644
+--- a/src/actions.cpp
++++ b/src/actions.cpp
+@@ -2045,9 +2045,13 @@ namespace {
+ #else
+ /* Unix/Linux/Cygwin/MacOSX */
+ #include <pthread.h>
++ /* This is the critical section object (statically allocated). */
+ #if defined(__APPLE__)
+- /* This is the critical section object (statically allocated). */
+- static pthread_mutex_t cs = PTHREAD_RECURSIVE_MUTEX_INITIALIZER;
++ #if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
++ static pthread_mutex_t cs = PTHREAD_RECURSIVE_MUTEX_INITIALIZER;
++ #else
++ static pthread_mutex_t cs = PTHREAD_MUTEX_INITIALIZER;
++ #endif
+ #else
+ static pthread_mutex_t cs = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+ #endif