From 712516f2ac531d63133072c2512ef64620423954 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 10 Dec 2020 20:07:53 +0100 Subject: [PATCH] shared: fix _POSIX_C_SOURCE not being defined for nm-errno.c This is the case with musl. Based-on-patch-by: Rasmus Thomsen --- shared/nm-glib-aux/nm-errno.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/nm-glib-aux/nm-errno.c b/shared/nm-glib-aux/nm-errno.c index f7a7685d8..2a9c7233b 100644 --- a/shared/nm-glib-aux/nm-errno.c +++ b/shared/nm-glib-aux/nm-errno.c @@ -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;