summaryrefslogtreecommitdiff
path: root/user/exiv2/0001-Amend-fix-for-9-to-apply-to-other-Unix-systems.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/exiv2/0001-Amend-fix-for-9-to-apply-to-other-Unix-systems.patch')
-rw-r--r--user/exiv2/0001-Amend-fix-for-9-to-apply-to-other-Unix-systems.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/user/exiv2/0001-Amend-fix-for-9-to-apply-to-other-Unix-systems.patch b/user/exiv2/0001-Amend-fix-for-9-to-apply-to-other-Unix-systems.patch
new file mode 100644
index 000000000..86412532d
--- /dev/null
+++ b/user/exiv2/0001-Amend-fix-for-9-to-apply-to-other-Unix-systems.patch
@@ -0,0 +1,36 @@
+From d775683f579543c35463ab2a8d9425da10d2f016 Mon Sep 17 00:00:00 2001
+From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
+Date: Wed, 4 Oct 2017 00:15:30 -0500
+Subject: [PATCH] Amend fix for #9 to apply to other Unix systems
+
+At least the musl libc on Linux has the same issue as Mac OS X: the
+PTHREAD_RECURSIVE_* static initialiser does not exist. This is a
+documented and purposeful omission:
+
+http://www.openwall.com/lists/musl/2017/02/20/3
+
+This commit uses similar logic to the Apple test on other Unixes.
+---
+ src/actions.cpp | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/actions.cpp b/src/actions.cpp
+index fe14de4..aa15ec7 100644
+--- a/src/actions.cpp
++++ b/src/actions.cpp
+@@ -2051,7 +2051,11 @@ namespace {
+ static pthread_mutex_t cs = PTHREAD_MUTEX_INITIALIZER;
+ #endif
+ #else
+- static pthread_mutex_t cs = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
++ #if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
++ static pthread_mutex_t cs = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
++ #else
++ static pthread_mutex_t cs = PTHREAD_MUTEX_INITIALIZER;
++ #endif
+ #endif
+ #endif
+
+--
+2.10.0
+