From e0554f9745e17deb60084d88543c95bb67bf1bff Mon Sep 17 00:00:00 2001 From: Willem Jan Withagen Date: Wed, 7 Dec 2016 13:58:07 +0100 Subject: [PATCH] POSIX/src/common/module.c: do not use strerror_r the GNU way. 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 --- src/common/module.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/module.c b/src/common/module.c index cdae181e8269a..efe484574ea6f 100644 --- a/src/common/module.c +++ b/src/common/module.c @@ -40,8 +40,9 @@ static int run_command(const char *command) 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));