about summary refs log tree commit diff
path: root/misc/tst-pselect.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2014-11-27 16:02:26 +0000
committerJoseph Myers <joseph@codesourcery.com>2014-11-27 16:02:26 +0000
commit6b5189eb2000761cd68c3c54c0d03357a9aaec67 (patch)
tree4480e1a76e4a596cd1b2a50127b2cdda5e3b94a1 /misc/tst-pselect.c
parent49051f8ea4551229fa656eba04031af51a5491c5 (diff)
downloadglibc-6b5189eb2000761cd68c3c54c0d03357a9aaec67.tar.gz
glibc-6b5189eb2000761cd68c3c54c0d03357a9aaec67.tar.xz
glibc-6b5189eb2000761cd68c3c54c0d03357a9aaec67.zip
Avoid deprecated sigblock in misc/tst-pselect.c.
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.
Diffstat (limited to 'misc/tst-pselect.c')
-rw-r--r--misc/tst-pselect.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/misc/tst-pselect.c b/misc/tst-pselect.c
index 36bc46da6c..095d794cb2 100644
--- a/misc/tst-pselect.c
+++ b/misc/tst-pselect.c
@@ -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;
     }