aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Chagin <dchagin@FreeBSD.org>2022-05-30 16:53:52 +0000
committerDmitry Chagin <dchagin@FreeBSD.org>2022-05-30 16:53:52 +0000
commit669516a1a16efe51f85ef203c3b93e6db7a3ed51 (patch)
tree6ee632c4a285b79229c3fc936f865460a692fcfa
parent109fd18ad96957c25cfaa78da2f825c729e33fef (diff)
downloadsrc-669516a1a16efe51f85ef203c3b93e6db7a3ed51.tar.gz
src-669516a1a16efe51f85ef203c3b93e6db7a3ed51.zip
linux(4): Fix the type of a constant in the signal mask macro
Since l_sigset_t is 64-bit unsigned on all Linuxulators, fix the type of a constant in the signal mask manipulation macro. The suffix L indicates type long which is 32-bit on i386, therefore, bitwise operations between a 32-bit constant and 64-bit signal mask lead to the wrong result. Pointy hat to: dchagin MFC after: 2 weeks
-rw-r--r--sys/compat/linux/linux.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/compat/linux/linux.h b/sys/compat/linux/linux.h
index 0309c4dbaaa8..cf250e29d278 100644
--- a/sys/compat/linux/linux.h
+++ b/sys/compat/linux/linux.h
@@ -118,8 +118,8 @@ typedef struct {
/* primitives to manipulate sigset_t */
#define LINUX_SIGEMPTYSET(set) (set).__mask = 0
-#define LINUX_SIGISMEMBER(set, sig) (1UL & ((set).__mask >> _SIG_IDX(sig)))
-#define LINUX_SIGADDSET(set, sig) (set).__mask |= 1UL << _SIG_IDX(sig)
+#define LINUX_SIGISMEMBER(set, sig) (1ULL & ((set).__mask >> _SIG_IDX(sig)))
+#define LINUX_SIGADDSET(set, sig) (set).__mask |= 1ULL << _SIG_IDX(sig)
void linux_to_bsd_sigset(l_sigset_t *, sigset_t *);
void bsd_to_linux_sigset(sigset_t *, l_sigset_t *);