Use a more robust check for the GNU C Library

_GNU_SOURCE alone is not definitive
This commit is contained in:
Paul Cornett
2018-11-05 21:09:13 -08:00
parent d735e444f1
commit 8929b3d3de

View File

@@ -1108,7 +1108,7 @@ static const wxChar* GetSysErrorMsg(wxChar* szBuf, size_t sizeBuf, unsigned long
char buffer[1024];
char *errorMsg = buffer;
#ifdef _GNU_SOURCE // GNU-specific strerror_r
#if defined(__GLIBC__) && defined(_GNU_SOURCE) // GNU-specific strerror_r
// GNU's strerror_r has a weird interface -- it doesn't
// necessarily copy anything to the buffer given; use return
// value instead.