mirror of
https://github.com/fluencelabs/musl
synced 2025-05-11 23:07:28 +00:00
sadly the C language does not specify any such implicit conversion, so this is not a matter of just fixing warnings (as gcc treats it) but actual errors. i would like to revisit a number of these changes and possibly revise the types used to reduce the number of casts required.
13 lines
284 B
C
13 lines
284 B
C
#include <setjmp.h>
|
|
#include <signal.h>
|
|
#include <stdlib.h>
|
|
|
|
void siglongjmp(sigjmp_buf buf, int ret)
|
|
{
|
|
unsigned long *flag = buf + sizeof(jmp_buf)/sizeof(long);
|
|
sigset_t *mask = (void *)(flag + 1);
|
|
if (*flag)
|
|
sigprocmask (SIG_SETMASK, mask, NULL);
|
|
longjmp((void *)buf, ret);
|
|
}
|