signal: Make sure that the signal mask is actually unsigned long.
authorDanny Milosavljevic <dannym@scratchpost.org>
Thu, 4 Jul 2019 00:39:11 +0000 (02:39 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Mon, 9 Sep 2019 14:04:14 +0000 (16:04 +0200)
* lib/linux/signal.c (signal): Make sure that the signal mask is actually
unsigned long.

lib/linux/signal.c

index 7940a00f34dead9ad345ba6c0dd3fc9588ad0293..75352599c5c44c3a4c9cb4359484323c3378aa0b 100644 (file)
@@ -47,7 +47,7 @@ signal (int signum, sighandler_t action)
   setup_action.sa_restorer = _restorer;
   bitindex = signum - 1;
   itembitcount = 8 * sizeof(setup_action.sa_mask.items[0]);
-  setup_action.sa_mask.items[bitindex / itembitcount] = 1 << (bitindex % itembitcount);
+  setup_action.sa_mask.items[bitindex / itembitcount] = 1UL << (bitindex % itembitcount);
   old.sa_handler = SIG_DFL;
   setup_action.sa_flags = SA_RESTORER | SA_RESTART;
   int r = _sys_call4 (SYS_rt_sigaction, signum, &setup_action, &old, sizeof (sigset_t));