void-packages/srcpkgs/exiv2/patches/musl.patch
Rasmus Thomsen 24da9e875e exiv2: update to 0.27.0.
[ci skip]
2019-01-04 11:44:01 +01:00

23 lines
656 B
Diff

diff --git a/src/futils.cpp b/src/futils.cpp
index a30acd9..24250fa 100644
--- src/futils.cpp
+++ src/futils.cpp
@@ -54,7 +54,7 @@
#include <stdexcept>
#ifdef EXV_HAVE_STRERROR_R
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) && defined(__GLIBC__)
extern char *strerror_r(int errnum, char *buf, size_t n);
#else
extern int strerror_r(int errnum, char *buf, size_t n);
@@ -348,7 +348,7 @@ namespace Exiv2 {
std::ostringstream os;
#ifdef EXV_HAVE_STRERROR_R
const size_t n = 1024;
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) && defined(__GLIBC__)
char *buf = 0;
char buf2[n];
std::memset(buf2, 0x0, n);