diff --git a/dsp/tty/ttyraw.c b/dsp/tty/ttyraw.c index 33b238a8d..c5c28d4ed 100644 --- a/dsp/tty/ttyraw.c +++ b/dsp/tty/ttyraw.c @@ -97,8 +97,8 @@ static relegated void ttyraw_onsig(int sig, struct siginfo *info, } for (i = 0; i < ARRAYLEN(g_ttyraw.sigs); ++i) { if (g_ttyraw.sigs[i] == sig) { - if (g_ttyraw.next[i] != SIG_IGN) { - if (g_ttyraw.next[i] != SIG_DFL) { + if (g_ttyraw.next[i] != (void *)SIG_IGN) { + if (g_ttyraw.next[i] != (void *)SIG_DFL) { if (g_ttyraw.next[i]) { g_ttyraw.next[i](sig, info, ctx); } @@ -117,7 +117,7 @@ static textstartup void ttyraw_initsig(int sig, unsigned flags, unsigned mask) { struct sigaction old; g_ttyraw.next[i] = xsigaction(sig, ttyraw_onsig, flags, mask, &old) != -1 ? old.sa_sigaction - : SIG_DFL; + : (void *)SIG_DFL; g_ttyraw.sigs[i++] = sig; } diff --git a/libc/calls/calls.h b/libc/calls/calls.h index e15ff85a8..c7bf66975 100644 --- a/libc/calls/calls.h +++ b/libc/calls/calls.h @@ -17,8 +17,8 @@ #define __WCLONE 0x80000000 /* Wait only on non-SIGCHLD children */ #define SIG_ERR ((void (*)(int))(-1)) -#define SIG_DFL ((void *)0) -#define SIG_IGN ((void *)1) +#define SIG_DFL ((void (*)(int))0) +#define SIG_IGN ((void (*)(int))1) #define MAP_FAILED ((void *)-1)