diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-09 23:16:10 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-09 23:16:10 +0000 |
commit | f0cbb868e7484534e11c405187811f5cca057615 (patch) | |
tree | 3dba553a3eeeb5d5a16a8456c36842c77f94d1a6 | |
parent | 3f05ee0f42a88ed4d1a77c10807f367af681f933 (diff) | |
download | ruby-f0cbb868e7484534e11c405187811f5cca057615.tar.gz |
* signal.c (check_stack_overflow): Don't use ucontext_t if ucontext.h
is not available.
Fixes build on Android (x86).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | signal.c | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,9 @@ +Thu Apr 10 08:13:47 2014 Tanaka Akira <akr@fsij.org> + + * signal.c (check_stack_overflow): Don't use ucontext_t if ucontext.h + is not available. + Fixes build on Android (x86). + Wed Apr 9 23:22:44 2014 Tanaka Akira <akr@fsij.org> * gc.c (mark_current_machine_context): Call SET_STACK_END. @@ -636,7 +636,7 @@ rb_get_next_signal(void) #if defined(USE_SIGALTSTACK) || defined(_WIN32) NORETURN(void ruby_thread_stack_overflow(rb_thread_t *th)); -#if defined __linux__ && (defined __i386__ || defined __x86_64__) +#if defined(HAVE_UCONTEXT_H) && defined __linux__ && (defined __i386__ || defined __x86_64__) static void check_stack_overflow(const uintptr_t addr, const ucontext_t *ctx) { @@ -665,7 +665,7 @@ check_stack_overflow(const void *addr) #define CHECK_STACK_OVERFLOW() check_stack_overflow(0) #else #define FAULT_ADDRESS info->si_addr -#if defined __linux__ && (defined __i386__ || defined __x86_64__) +#if defined(HAVE_UCONTEXT_H) && defined __linux__ && (defined __i386__ || defined __x86_64__) # define CHECK_STACK_OVERFLOW() check_stack_overflow((uintptr_t)FAULT_ADDRESS, ctx) #else # define CHECK_STACK_OVERFLOW() check_stack_overflow(FAULT_ADDRESS) |