From the manpage:
char *strerror(int errnum);
int strerror_r(int errnum, char *buf, size_t buflen);
/* XSI-compliant */
char *strerror_r(int errnum, char *buf, size_t buflen);
/* GNU-specific */
So changed the strerror_r() version to a version where we ignore the
the result of the function call
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
if (status < 0) {
char error_buf[80];
+ strerror_r(errno, error_buf, sizeof(error_buf));
fprintf(stderr, "couldn't run '%s': %s\n", command,
- strerror_r(errno, error_buf, sizeof(error_buf)));
+ error_buf);
} else if (WIFSIGNALED(status)) {
fprintf(stderr, "'%s' killed by signal %d\n", command,
WTERMSIG(status));