shared: fix _POSIX_C_SOURCE not being defined for nm-errno.c

This is the case with musl.

Based-on-patch-by: Rasmus Thomsen <oss@cogitri.dev>
This commit is contained in:
Thomas Haller 2020-12-10 20:07:53 +01:00
parent ba4142b328
commit 712516f2ac
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -106,7 +106,7 @@ nm_strerror_native_r(int errsv, char *buf, gsize buf_size)
nm_assert(buf);
nm_assert(buf_size > 0);
#if (_POSIX_C_SOURCE >= 200112L) && !_GNU_SOURCE
#if (!defined(__GLIBC__) && !defined(__UCLIBC__)) || ((_POSIX_C_SOURCE >= 200112L) && !_GNU_SOURCE)
/* XSI-compliant */
{
int errno_saved = errno;