summaryrefslogtreecommitdiff
path: root/sys/compat/linux
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2021-10-27 16:40:04 +0000
committerthorpej <thorpej@NetBSD.org>2021-10-27 16:40:04 +0000
commiteeca7e54903088d6f026baec838c515d64134bc8 (patch)
treeea55fd8281bd15607ae0407cb729abfa289aa6e7 /sys/compat/linux
parentf85300b7b6f1034a26d8e14e1a963b0036b708cd (diff)
Use __SIGTRAMP_SIGCODE_VERSION rather than hard-coding 0.
Diffstat (limited to 'sys/compat/linux')
-rw-r--r--sys/compat/linux/arch/amd64/linux_machdep.c6
-rw-r--r--sys/compat/linux/common/linux_signal.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/compat/linux/arch/amd64/linux_machdep.c b/sys/compat/linux/arch/amd64/linux_machdep.c
index 1e9724664df..300dbddf560 100644
--- a/sys/compat/linux/arch/amd64/linux_machdep.c
+++ b/sys/compat/linux/arch/amd64/linux_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_machdep.c,v 1.60 2021/09/07 11:43:03 riastradh Exp $ */
+/* $NetBSD: linux_machdep.c,v 1.61 2021/10/27 16:40:04 thorpej Exp $ */
/*-
* Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.60 2021/09/07 11:43:03 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.61 2021/10/27 16:40:04 thorpej Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -167,7 +167,7 @@ linux_sendsig(const ksiginfo_t *ksi, const sigset_t *mask)
sfp = (struct linux_rt_sigframe *)sp;
memset(&sigframe, 0, sizeof(sigframe));
- if (ps->sa_sigdesc[sig].sd_vers != 0)
+ if (ps->sa_sigdesc[sig].sd_vers != __SIGTRAMP_SIGCODE_VERSION)
sigframe.pretcode =
(char *)(u_long)ps->sa_sigdesc[sig].sd_tramp;
else
diff --git a/sys/compat/linux/common/linux_signal.c b/sys/compat/linux/common/linux_signal.c
index c0d729ded43..49d700267d1 100644
--- a/sys/compat/linux/common/linux_signal.c
+++ b/sys/compat/linux/common/linux_signal.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_signal.c,v 1.86 2021/09/23 06:56:27 ryo Exp $ */
+/* $NetBSD: linux_signal.c,v 1.87 2021/10/27 16:40:05 thorpej Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.86 2021/09/23 06:56:27 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.87 2021/10/27 16:40:05 thorpej Exp $");
#define COMPAT_LINUX 1
@@ -391,7 +391,7 @@ linux_sys_rt_sigaction(struct lwp *l, const struct linux_sys_rt_sigaction_args *
native_to_linux_sigaction(&olsa, &obsa);
#ifdef LINUX_SA_RESTORER
- if (ps->sa_sigdesc[sig].sd_vers != 0) {
+ if (ps->sa_sigdesc[sig].sd_vers != __SIGTRAMP_SIGCODE_VERSION) {
olsa.linux_sa_restorer = ps->sa_sigdesc[sig].sd_tramp;
olsa.linux_sa_flags |= LINUX_SA_RESTORER;
}