diff options
Diffstat (limited to 'strings/my_vsnprintf.c')
-rw-r--r-- | strings/my_vsnprintf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/strings/my_vsnprintf.c b/strings/my_vsnprintf.c index 1584a9e2cef..134fdfc57b8 100644 --- a/strings/my_vsnprintf.c +++ b/strings/my_vsnprintf.c @@ -755,14 +755,14 @@ int my_vfprintf(FILE *stream, const char* format, va_list args) and try again. */ if (alloc) - (*my_str_free)(p); + my_free(p); else alloc= 1; new_len= cur_len*2; if (new_len < cur_len) return 0; /* Overflow */ cur_len= new_len; - p= (*my_str_malloc)(cur_len); + p= my_malloc(cur_len, MYF(MY_FAE)); if (!p) return 0; } @@ -770,7 +770,7 @@ int my_vfprintf(FILE *stream, const char* format, va_list args) if (fputs(p, stream) < 0) ret= -1; if (alloc) - (*my_str_free)(p); + my_free(p); return ret; } @@ -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. */ |