changeset 1777:56c019ed8746

Some systems do not have SA_SIGINFO (siginfo_t), like GNU/Hurd, so just test if defined or not. Patch by Michal iha (Bug ID: 2894271).
author zas_
date Fri, 04 Dec 2009 21:01:11 +0000
parents f0e9f2dcfe8a
children e82401bf20c8
files src/main.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/main.c	Fri Dec 04 20:40:02 2009 +0000
+++ b/src/main.c	Fri Dec 04 21:01:11 2009 +0000
@@ -709,7 +709,7 @@
  */
 /* FIXME: this probably needs some better ifdefs. Please report any compilation problems */
 
-#ifdef SIGBUS
+#if defined(SIGBUS) && defined(SA_SIGINFO)
 static void sigbus_handler_cb(int signum, siginfo_t *info, void *context)
 {
 	unsigned long pagesize = sysconf(_SC_PAGE_SIZE);
@@ -720,7 +720,7 @@
 
 static void setup_sigbus_handler(void)
 {
-#ifdef SIGBUS
+#if defined(SIGBUS) && defined(SA_SIGINFO)
 	struct sigaction sigbus_action;
 	sigfillset(&sigbus_action.sa_mask);
 	sigbus_action.sa_sigaction = sigbus_handler_cb;