From d80b8442a68093106e00a9a38b7b2c593002a72c Mon Sep 17 00:00:00 2001 From: Monty Date: Sun, 7 Feb 2016 15:00:30 +0200 Subject: Fixes needed to compile with musl C library Patch originally by Codarren Velvindron --- strings/my_vsnprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'strings') diff --git a/strings/my_vsnprintf.c b/strings/my_vsnprintf.c index 1584a9e2cef..4178b20789d 100644 --- a/strings/my_vsnprintf.c +++ b/strings/my_vsnprintf.c @@ -831,7 +831,7 @@ void my_strerror(char *buf, size_t len, int nr) (defined _XOPEN_SOURCE && (_XOPEN_SOURCE >= 600))) && \ ! defined _GNU_SOURCE strerror_r(nr, buf, len); /* I can build with or without GNU */ -#elif defined _GNU_SOURCE +#elif defined(__GLIBC__) && defined (_GNU_SOURCE) char *r= strerror_r(nr, buf, len); if (r != buf) /* Want to help, GNU? */ strmake(buf, r, len - 1); /* Then don't. */ -- cgit v1.2.1