From: Justin Pryzby <justinpryzby@users.sf.net>
Date: Mon, 25 Sep 2017 14:07:50 +0200
Subject: Handle the "sigbus" case only if it exists

---
 src/fits/fitscleanup.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/fits/fitscleanup.c b/src/fits/fitscleanup.c
index 88dadbd..3f7ab2e 100644
--- a/src/fits/fitscleanup.c
+++ b/src/fits/fitscleanup.c
@@ -164,7 +164,9 @@ void	install_cleanup(void (*func)(void))
 /* Catch CTRL-Cs */
   signal(SIGINT, signal_function);
 /* Catch bus errors */
+#ifdef	SIGBUS // TODO: what if it is an enum?
   signal(SIGBUS, signal_function);
+#endif
 /* Catch segmentation faults */
   signal(SIGSEGV, signal_function);
 /* Catch floating exceptions */
@@ -195,9 +197,11 @@ void	signal_function(int signum)
     case SIGINT:
       fprintf(stderr, "^C\n");
       exit(-1);
+#ifdef	SIGBUS
     case SIGBUS:
       fprintf(stderr, "bus error\n");
       exit(-1);
+#endif
     case SIGSEGV:
       fprintf(stderr, "segmentation fault\n");
       exit(-1);
