From 6f3fe6b74afd9b46db6a25e0b3b6de4db64067fd Mon Sep 17 00:00:00 2001 From: kettenis Date: Thu, 17 Jun 2021 16:09:08 +0000 Subject: [PATCH] On OpenBSD _JBLEN is the number of slots (of type long) in jmp_buf. We don't need 256 slots, so change it to 32 which leaves us with a few spare slots and is probably what was intended. This fixes building emacs which does some insane setjmp(3)/longjmp(3) stuff and gets upset when jmp_buf is 2048 bytes. ok deraadt@ --- sys/arch/riscv64/include/setjmp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arch/riscv64/include/setjmp.h b/sys/arch/riscv64/include/setjmp.h index 7b246de8999..15c39636b4b 100644 --- a/sys/arch/riscv64/include/setjmp.h +++ b/sys/arch/riscv64/include/setjmp.h @@ -1,8 +1,8 @@ -/* $OpenBSD: setjmp.h,v 1.3 2021/05/12 01:20:52 jsg Exp $ */ +/* $OpenBSD: setjmp.h,v 1.4 2021/06/17 16:09:08 kettenis Exp $ */ /* * machine/setjmp.h: machine dependent setjmp-related information. */ -#define _JBLEN 256 /* sp, ra, [f]s0-11, fscr, magic val, sigmask */ +#define _JBLEN 32 /* sp, ra, [f]s0-11, fscr, magic val, sigmask */ #define _JB_SIGMASK 28 -- 2.20.1