From 3bd8422b057d022134fc17620f348815fd0fafd7 Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Wed, 4 Jan 2017 09:54:48 +0800 Subject: [PATCH] =?utf8?q?common:=20get=20rid=20of=20"warning:=20ignoring?= =?utf8?q?=20return=20value=20of=20=E2=80=98strerror=5Fr=E2=80=99"?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: xie xingguo --- src/common/module.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common/module.c b/src/common/module.c index efe484574ea..b251274a5f1 100644 --- a/src/common/module.c +++ b/src/common/module.c @@ -10,6 +10,7 @@ * */ +#include "acconfig.h" #include #include #include @@ -40,7 +41,12 @@ static int run_command(const char *command) if (status < 0) { char error_buf[80]; +#ifdef STRERROR_R_CHAR_P + char* dummy = strerror_r(errno, error_buf, sizeof(error_buf)); + (void)dummy; +#else strerror_r(errno, error_buf, sizeof(error_buf)); +#endif fprintf(stderr, "couldn't run '%s': %s\n", command, error_buf); } else if (WIFSIGNALED(status)) { -- 2.39.5