summaryrefslogtreecommitdiff
path: root/strings/my_vsnprintf.c
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2016-02-07 15:00:30 +0200
committerMonty <monty@mariadb.org>2016-02-07 15:00:30 +0200
commitd80b8442a68093106e00a9a38b7b2c593002a72c (patch)
tree17881f51bbc0fbe4b25d09d23e5a292a75a58298 /strings/my_vsnprintf.c
parent07b8aefe90ca830d2de068f2966cd2288b158a88 (diff)
downloadmariadb-git-d80b8442a68093106e00a9a38b7b2c593002a72c.tar.gz
Fixes needed to compile with musl C library
Patch originally by Codarren Velvindron
Diffstat (limited to 'strings/my_vsnprintf.c')
-rw-r--r--strings/my_vsnprintf.c2
1 files changed, 1 insertions, 1 deletions
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. */