summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2009-04-25 15:38:54 +1000
committerDaniel Stone <daniel@fooishbar.org>2009-06-11 03:55:57 +1000
commitf534e6bea17746db952feb563ffea7320846b49d (patch)
tree258846147761e61232f457e70eaeb078a1a4cb81 /os
parent305ab237f666936cd812c464bf43f86f6079838e (diff)
OS: Fix compile warnings
It's a marvel the sigaction() ever actually worked. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'os')
-rw-r--r--os/osinit.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/os/osinit.c b/os/osinit.c
index 1559135fa..17a2bedc7 100644
--- a/os/osinit.c
+++ b/os/osinit.c
@@ -136,8 +136,8 @@ OsSigHandler(int signo)
#ifdef SA_SIGINFO
if (sip->si_code == SI_USER) {
- ErrorF("Recieved signal %ld sent by process %ld, uid %ld\n",
- (long) sip->si_code, (long) sip->si_pid, (long) sip->si_uid);
+ ErrorF("Recieved signal %d sent by process %ld, uid %ld\n",
+ signo, (long) sip->si_pid, (long) sip->si_uid);
} else {
switch (signo) {
case SIGSEGV:
@@ -179,10 +179,12 @@ OsInit(void)
#endif
0 /* must be last */ };
sigemptyset(&act.sa_mask);
- act.sa_handler = OsSigHandler;
- act.sa_flags = 0;
#ifdef SA_SIGINFO
- act.sa_flags |= SA_SIGINFO;
+ act.sa_sigaction = OsSigHandler;
+ act.sa_flags = SA_SIGINFO;
+#else
+ act.sa_handler = OsSigHandler;
+ act.sa_flags = 0;
#endif
for (i = 0; siglist[i] != 0; i++) {
if (sigaction(siglist[i], &act, &oact)) {