[klibc] [klibc:update-dash] dash: system: Disable glibc warning on sigsetmask

klibc-bot for Herbert Xu herbert at gondor.apana.org.au
Sat Mar 28 14:49:37 PDT 2020

Commit-ID:  5c65fe97c9c00feb5ed10598dcd51ef7399be7ff
Gitweb:     http://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)
+#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"
+#ifdef __GLIBC__
+#pragma GCC diagnostic pop
 	sigset_t set;

More information about the klibc mailing list