sigjmp_buf and jmp_buf are incompatible types on i386
Relibc currently defines the prototype of sigsetjmp
as int32_t sigsetjmp(uint64_t *, int32_t)
on all platforms, while on i386, setjmp
is defined as int setjmp(jmp_buf)
where jmp_buf
is unsigned long[6]
. siglongjmp
and longjmp
are different in the same way. This currently causes 32-bit Redox builds to fail due to assumptions gettext makes that the first arguments of setjmp
and sigsetjmp
are equivalent, ultimately ending with a multiple symbol definitions error when compiling. Due to the fact that sigsetjmp
isn't actually implemented on anything other than amd64 currently anyway and the way gettext macros its sigsetjmp
calls, this issue can be solved for now by simply putting the prototypes for sigsetjmp
and siglongjmp
in signal.h
behind an #ifdef __x86_64__
.