summaryrefslogtreecommitdiff
path: root/audio/tunesbrowser/patches/patch-aa
blob: cbfe08f7fdcae42ab70411d6890f6f87b4c59a45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
$NetBSD: patch-aa,v 1.2 2005/03/20 11:09:47 jmmv Exp $

--- main.c.orig	2005-01-04 03:58:29.000000000 +0100
+++ main.c
@@ -38,7 +38,7 @@ static void sighandler_sigsegv(__UNUSED_
 {
     fprintf(stderr, "Oops! TunesBrowser has crashed. Sorry about that!\n");
     fprintf(stderr, "This probably won't be of any use unless you feel like debugging,\n");
-    fprintf(stderr, "but the crash occured because of %p being bad.\n", siginfo->si_ptr);
+    fprintf(stderr, "but the crash occured because of a pointer being bad.\n");
 #if 0
     fprintf(stderr, "\n\nRaised SIGSTOP. You can now attach a debugger.\n");
     fprintf(stderr, "Attach to PID %i\n", getpid());
@@ -66,11 +66,19 @@ static void install_sighandlers()
     int ret;
 
     sa.sa_handler = (void*)sighandler_sigsegv;
+#ifdef SA_NOMASK
     sa.sa_flags = SA_NOMASK | SA_SIGINFO;
+#else
+    sa.sa_flags = SA_SIGINFO;
+#endif
     ret = sigaction(SIGSEGV, &sa, NULL);
 
     sa.sa_handler = (void*)sighandler_sigpipe;
+#ifdef SA_NOMASK
     sa.sa_flags = SA_NOMASK | SA_SIGINFO;
+#else
+    sa.sa_flags = SA_SIGINFO;
+#endif
     ret = sigaction(SIGPIPE, &sa, NULL);
 }