diff options
Diffstat (limited to 'newlib/libc/stdio/perror.c')
-rw-r--r-- | newlib/libc/stdio/perror.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/newlib/libc/stdio/perror.c b/newlib/libc/stdio/perror.c index 5dbf3326c..14b4d2173 100644 --- a/newlib/libc/stdio/perror.c +++ b/newlib/libc/stdio/perror.c @@ -73,6 +73,7 @@ _DEFUN(_perror_r, (ptr, s), _CONST char *s) { char *error; + int dummy; _REENT_SMALL_CHECK_INIT (ptr); if (s != NULL && *s != '\0') @@ -81,7 +82,7 @@ _DEFUN(_perror_r, (ptr, s), fputs (": ", _stderr_r (ptr)); } - if ((error = strerror (ptr->_errno)) != NULL) + if ((error = _strerror_r (ptr, ptr->_errno, 1, &dummy)) != NULL) fputs (error, _stderr_r (ptr)); fputc ('\n', _stderr_r (ptr)); |