From: Alexander von Gluck Date: 2010-01-25T12:16:02+09:00 Subject: [ruby-core:27776] [Bug #2640] signal code only needs slight changes to make Ruby compile on Haiku-os Issue #2640 has been updated by Alexander von Gluck. The patch suggested at http://znz.s1.xrea.com/t/?date=20090926 causes the bus error for me too and seems like an invalid work-around. The overall solution for this issue is on Haiku's side and not Ruby's fault. http://dev.haiku-os.org/ticket/2695 Until Haiku fixes this I'll just comment out the broken call which seems to work and make a miniruby that works :). Just a quick note that this patch may cause some bad mojo on a sigsegv and should not be used in production apps. Index: signal.c =================================================================== --- signal.c (revision 26395) +++ signal.c (working copy) @@ -34,7 +34,7 @@ # define ATOMIC_DEC(var) (--(var)) #endif -#ifdef __BEOS__ +#if defined(__BEOS__) || defined(__HAIKU__) #undef SIGBUS #endif @@ -597,6 +597,7 @@ static RETSIGTYPE sigsegv(int sig SIGINFO_ARG) { +/* #ifdef USE_SIGALTSTACK int ruby_stack_overflowed_p(const rb_thread_t *, const void *); NORETURN(void ruby_thread_stack_overflow(rb_thread_t *th)); @@ -605,6 +606,7 @@ ruby_thread_stack_overflow(th); } #endif +*/ if (segv_received) { fprintf(stderr, "SEGV received in SEGV handler\n"); exit(EXIT_FAILURE); ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2640 ---------------------------------------- http://redmine.ruby-lang.org