klibc-bot for Herbert Xu
2020-Mar-28 21:49 UTC
[klibc] [klibc:update-dash] dash: system: Disable glibc warning on sigsetmask
Commit-ID: 5c65fe97c9c00feb5ed10598dcd51ef7399be7ff Gitweb: git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=5c65fe97c9c00feb5ed10598dcd51ef7399be7ff Author: Herbert Xu <herbert at gondor.apana.org.au> AuthorDate: Wed, 21 Nov 2018 11:45:04 +0800 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sat, 28 Mar 2020 21:42:55 +0000 [klibc] dash: system: Disable glibc warning on sigsetmask [ dash commit 284b9192ed12a80b35fa7b9b85d75055887b64e9 ] As sigsetmask is set as deprecated in glibc this patch adds the pragmas to disable the warning in gcc around our one and only use of sigsetmask. It also disables it completely for non-gcc compilers and older gcc compilers as they may generate a warning too. Reported-by: Antonio Ospite <ao2 at ao2.it> Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au> Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/dash/system.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/usr/dash/system.h b/usr/dash/system.h index c8424f75..f23e3863 100644 --- a/usr/dash/system.h +++ b/usr/dash/system.h @@ -36,8 +36,17 @@ static inline void sigclearmask(void) { -#ifdef HAVE_SIGSETMASK +#if defined(HAVE_SIGSETMASK) && \ + (!defined(__GLIBC__) || \ + (defined(__GNUC__) && (__GNUC__ * 1000 + __GNUC_MINOR__) >= 4006)) +#ifdef __GLIBC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif sigsetmask(0); +#ifdef __GLIBC__ +#pragma GCC diagnostic pop +#endif #else sigset_t set; sigemptyset(&set);
Seemingly Similar Threads
- [klibc:update-dash] dash: eval: make traps work when "set -e" is enabled
- [klibc:update-dash] dash: eval: Silence compiler warning about missing parentheses
- [klibc:update-dash] [PATCH] eval: Silence compiler warning about missing parentheses
- [klibc:master] dash: shell: Fix clang warnings about "string plus integer"
- [klibc:master] dash: output: Fix clang warnings about GNU old-style field designator