]> granicus.if.org Git - gc/commitdiff
Define old_bus_handler static variable only if used (Unix)
authorIvan Maidanski <ivmai@mail.ru>
Thu, 18 Oct 2012 04:50:36 +0000 (08:50 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 18 Oct 2012 13:52:40 +0000 (17:52 +0400)
* os_dep.c (old_bus_handler): Define only if SIGBUS (only for
UNIX_LIKE or NEED_FIND_LIMIT).

os_dep.c

index 02593c353143ca2c21440e78cebcec944ea7911a..f042758a41dee6a9c522d3a41bec7f59a1a5ec15 100644 (file)
--- a/os_dep.c
+++ b/os_dep.c
@@ -851,7 +851,10 @@ GC_INNER word GC_page_size = 0;
             static struct sigaction old_bus_act;
 #       endif
 #   else
-        static GC_fault_handler_t old_segv_handler, old_bus_handler;
+      static GC_fault_handler_t old_segv_handler;
+#     ifdef SIGBUS
+        static GC_fault_handler_t old_bus_handler;
+#     endif
 #   endif
 
     GC_INNER void GC_set_and_save_fault_handler(GC_fault_handler_t h)