From 8e826775fb9c20076354040340cba1a7fa81643c Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 9 Nov 2022 16:38:00 +0000 Subject: [PATCH] Use the same union in riscv64's ucontext. We don't need this (any more than arm64 does), because riscv64 is too new to have had a too-small sigset_t, but it's useful for source code compatibility with code that needs to build on arm32/x86 too. Test: treehugger Change-Id: Ied5f64d9094bc7d31c059f82f9e4ffe9b8ca4061 --- libc/include/sys/ucontext.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libc/include/sys/ucontext.h b/libc/include/sys/ucontext.h index 72b8adbf0..8e5873d03 100644 --- a/libc/include/sys/ucontext.h +++ b/libc/include/sys/ucontext.h @@ -366,7 +366,10 @@ typedef struct ucontext_t { unsigned long uc_flags; struct ucontext_t* uc_link; stack_t uc_stack; - sigset_t uc_sigmask; + union { + sigset_t uc_sigmask; + sigset64_t uc_sigmask64; + }; /* The kernel adds extra padding here to allow sigset_t to grow. */ char __padding[128 - sizeof(sigset_t)]; mcontext_t uc_mcontext;