#ifndef _SETJMP_H #define _SETJMP_H #ifdef __aarch64__ typedef unsigned long long jmp_buf[22]; #endif #ifdef __i386__ typedef unsigned long long jmp_buf[6]; #endif #ifdef __x86_64__ typedef unsigned long long jmp_buf[16]; #endif #ifdef __riscv typedef unsigned long long jmp_buf[26]; #endif typedef jmp_buf sigjmp_buf; #ifdef __cplusplus extern "C" { #endif int setjmp(jmp_buf buf); void longjmp(jmp_buf buf, int value); int sigsetjmp(jmp_buf buf, int savemask); int siglongjmp(jmp_buf buf, int savemask); /* POSIX _setjmp/_longjmp. relibc already EXPORTS both -- `nm libc.a` shows `T _setjmp` and `T _longjmp` as aliases of setjmp/longjmp -- they were simply never declared here, so callers got an implicit declaration, which GCC 14+ makes an error: lua-5.4.4/src/ldo.c:66: error: implicit declaration of function '_longjmp'; did you mean 'longjmp'? (wireplumber bundles Lua, which uses them under LUA_USE_POSIX.) The distinction from setjmp/longjmp is the signal mask, which relibc's implementation does not save in either form, so the alias is accurate. */ int _setjmp(jmp_buf buf); void _longjmp(jmp_buf buf, int value); #ifdef __cplusplus } // extern "C" #endif #endif /* _SETJMP_H */