]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Avoid deprecated sigblock in misc/tst-pselect.c.
authorJoseph Myers <joseph@codesourcery.com>
Thu, 27 Nov 2014 16:02:26 +0000 (16:02 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Thu, 27 Nov 2014 16:02:26 +0000 (16:02 +0000)
misc/tst-pselect.c uses the deprecated sigblock interface, resulting
in "tst-pselect.c:42:3: warning: 'sigblock' is deprecated (declared at
../signal/signal.h:189) [-Wdeprecated-declarations]".  The choice of
sigblock rather than sigprocmask has nothing to do with what this test
is testing, so this patch changes it to use sigprocmask to avoid the
warning.

Tested for x86_64.

* misc/tst-pselect.c (do_test): Use sigprocmask instead of
sigblock.

ChangeLog
misc/tst-pselect.c

index 7fdc85da897d7896ec8077ca52ba4c4e4cf0ed2d..e0313b8f0793c7566c336dd339762c94c7f7fbe4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2014-11-27  Joseph Myers  <joseph@codesourcery.com>
 
+       * misc/tst-pselect.c (do_test): Use sigprocmask instead of
+       sigblock.
+
        * libio/bug-ungetwc1.c (do_test): Verify results of getwc and
        feof.
 
index 36bc46da6c94174aa2ce6a5e369fd51964d794eb..095d794cb2735e18c233d8c6c550f06580516689 100644 (file)
@@ -39,9 +39,12 @@ do_test (void)
       return 1;
     }
 
-  if (sigblock (sigmask (SIGUSR1)) != 0)
+  sigset_t ss_usr1;
+  sigemptyset (&ss_usr1);
+  sigaddset (&ss_usr1, SIGUSR1);
+  if (sigprocmask (SIG_BLOCK, &ss_usr1, NULL) != 0)
     {
-      puts ("sigblock failed");
+      puts ("sigprocmask failed");
       return 1;
     }