diff --git a/libc/include/sys/ucontext.h b/libc/include/sys/ucontext.h index 8e5873d03..cefe17755 100644 --- a/libc/include/sys/ucontext.h +++ b/libc/include/sys/ucontext.h @@ -316,6 +316,8 @@ typedef struct ucontext { #define NGREG 32 +#if defined(__USE_GNU) + #define REG_PC 0 #define REG_RA 1 #define REG_SP 2 @@ -323,6 +325,8 @@ typedef struct ucontext { #define REG_S0 8 #define REG_A0 10 +#endif // defined(__USE_GNU) + typedef unsigned long __riscv_mc_gp_state[NGREG]; typedef unsigned long greg_t;