Jilles Tjoelker <jilles@xxxxxxxx> wrote: > > The git history starts (in 2005) after HAVE_SIGSETMASK was added, but I > expect it was done this way to save a few bytes in the executable. With > ProPolice, the effect may be a bit more since a local variable of type > sigset_t often contains an array and may cause functions to be compiled > with stack protection when they otherwise wouldn't (note that > sigclearmask() is inline). > > Both FreeBSD and NetBSD simply changed the sigsetmask() call to a > sigprocmask() call very early on (1995-1996). > > Personally, I think clean code that compiles without warnings is more > important than making the executable as small as possible, but the > maintainer may not agree. I agree with getting rid of the warning, and this seems to work for me. Please let me know if you still a get warning on some other platform. Thanks! ---8<--- 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. Reported-by: Antonio Ospite <ao2@xxxxxx> Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> diff --git a/src/system.h b/src/system.h index a8d09b3..f3aa930 100644 --- a/src/system.h +++ b/src/system.h @@ -37,7 +37,14 @@ static inline void sigclearmask(void) { #ifdef HAVE_SIGSETMASK +#if defined(__GNUC__) && (__GNUC__ * 1000 + __GNUC_MINOR__) >= 4006 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif sigsetmask(0); +#if defined(__GNUC__) && (__GNUC__ * 1000 + __GNUC_MINOR__) >= 4006 +#pragma GCC diagnostic pop +#endif #else sigset_t set; sigemptyset(&set); -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt