diff --git a/src/futils.cpp b/src/futils.cpp index a30acd98..00e71172 100644 --- a/src/futils.cpp +++ b/src/futils.cpp @@ -54,7 +54,7 @@ #include #ifdef EXV_HAVE_STRERROR_R -#ifdef _GNU_SOURCE +#if defined(__GLIBC__) && defined(_GNU_SOURCE) 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(__GLIBC__) && defined(_GNU_SOURCE) char *buf = 0; char buf2[n]; std::memset(buf2, 0x0, n);