From 8f3f91d3db1f740002c2f69327370350753c8851 Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Thu, 19 Nov 2015 22:23:47 +0100 Subject: Check for __GLIBC__ to detect correct strerror_r version --- src/OSSupport/Errors.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/OSSupport/Errors.cpp b/src/OSSupport/Errors.cpp index 7fcd3168f..ce2e2acb0 100644 --- a/src/OSSupport/Errors.cpp +++ b/src/OSSupport/Errors.cpp @@ -22,7 +22,7 @@ AString GetOSErrorString( int a_ErrNo) // According to http://linux.die.net/man/3/strerror_r there are two versions of strerror_r(): - #if !defined(__APPLE__) && defined( _GNU_SOURCE) && !defined(ANDROID_NDK) // GNU version of strerror_r() + #if defined(__GLIBC__) && defined( _GNU_SOURCE) && !defined(ANDROID_NDK) // GNU version of strerror_r() char * res = strerror_r( errno, buffer, ARRAYCOUNT(buffer)); if (res != nullptr) -- cgit v1.2.3