From 4638092ae7614210b5961cb7551cf0caa3777080 Mon Sep 17 00:00:00 2001 From: chendexi Date: Sat, 1 Jul 2023 14:34:11 +0800 Subject: [PATCH] Handle missing errno command for architectures other than x86_64 --- src/libs/errno_helper.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libs/errno_helper.c b/src/libs/errno_helper.c index e6156a4f..e1206751 100644 --- a/src/libs/errno_helper.c +++ b/src/libs/errno_helper.c @@ -207,5 +207,13 @@ close: err = pclose(f); if (err < 0) warn("pclose: %s\n", strerror(errno)); +#ifndef __x86_64__ + /* Ignore the error for x86_64 where we have a table compiled in */ + else if (err && WEXITSTATUS(err) == 127) { + warn("errno(1) required for errno name/number mapping\n"); + } else if (err) { + warn("errno(1) exit status (see wait(2)): 0x%x\n", err); + } +#endif return number; } -- Gitee