From: Thomas Weißschuh Date: Thu, 11 May 2023 10:42:27 +0000 (+0200) Subject: c.h: make err_nonsys available X-Git-Tag: v2.40-rc1~466^2~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bb2b071f54aa3a6bc5d713ba0c20178b9a291a6f;p=thirdparty%2Futil-linux.git c.h: make err_nonsys available Signed-off-by: Thomas Weißschuh --- diff --git a/include/c.h b/include/c.h index 2b70e8d18b..f9f90f3bbe 100644 --- a/include/c.h +++ b/include/c.h @@ -294,6 +294,9 @@ void __err_oom(const char *file, unsigned int line) } #define err_oom() __err_oom(__FILE__, __LINE__) +#define err_nosys(exitcode, ...) \ + err(errno == ENOSYS ? EXIT_NOTSUPP : exitcode, __VA_ARGS__) + /* Don't use inline function to avoid '#include "nls.h"' in c.h */ diff --git a/misc-utils/waitpid.c b/misc-utils/waitpid.c index b01a2f0131..faf86ab6b7 100644 --- a/misc-utils/waitpid.c +++ b/misc-utils/waitpid.c @@ -41,9 +41,6 @@ #define TIMEOUT_SOCKET_IDX UINT64_MAX -#define err_nosys(exitcode, ...) \ - err(errno == ENOSYS ? EXIT_NOTSUPP : exitcode, __VA_ARGS__) - static bool verbose = false; static struct timespec timeout; static bool allow_exited = false;