olga / rpms / glibc

Forked from rpms/glibc 5 years ago
Clone

Blame SOURCES/glibc-rh1505492-deprecated-1.patch

00db10
commit 6b5189eb2000761cd68c3c54c0d03357a9aaec67
00db10
Author: Joseph Myers <joseph@codesourcery.com>
00db10
Date:   Thu Nov 27 16:02:26 2014 +0000
00db10
00db10
    Avoid deprecated sigblock in misc/tst-pselect.c.
00db10
    
00db10
    misc/tst-pselect.c uses the deprecated sigblock interface, resulting
00db10
    in "tst-pselect.c:42:3: warning: 'sigblock' is deprecated (declared at
00db10
    ../signal/signal.h:189) [-Wdeprecated-declarations]".  The choice of
00db10
    sigblock rather than sigprocmask has nothing to do with what this test
00db10
    is testing, so this patch changes it to use sigprocmask to avoid the
00db10
    warning.
00db10
    
00db10
    Tested for x86_64.
00db10
    
00db10
            * misc/tst-pselect.c (do_test): Use sigprocmask instead of
00db10
            sigblock.
00db10
00db10
diff --git a/misc/tst-pselect.c b/misc/tst-pselect.c
00db10
index 36bc46da6c94174a..095d794cb2735e18 100644
00db10
--- a/misc/tst-pselect.c
00db10
+++ b/misc/tst-pselect.c
00db10
@@ -39,9 +39,12 @@ do_test (void)
00db10
       return 1;
00db10
     }
00db10
 
00db10
-  if (sigblock (sigmask (SIGUSR1)) != 0)
00db10
+  sigset_t ss_usr1;
00db10
+  sigemptyset (&ss_usr1);
00db10
+  sigaddset (&ss_usr1, SIGUSR1);
00db10
+  if (sigprocmask (SIG_BLOCK, &ss_usr1, NULL) != 0)
00db10
     {
00db10
-      puts ("sigblock failed");
00db10
+      puts ("sigprocmask failed");
00db10
       return 1;
00db10
     }
00db10