From 854db4e8654717b86d3f455d6e874cd5ad6fd39d Mon Sep 17 00:00:00 2001 From: usa Date: Thu, 3 Jul 2014 05:13:06 +0000 Subject: * thread_pthread.c: fixed compile error on linux. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@46669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread_pthread.c | 8 ++++++++ version.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/thread_pthread.c b/thread_pthread.c index 11b665fda4..840e6844ab 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -520,6 +520,9 @@ size_t pthread_get_stacksize_np(pthread_t); # define MAINSTACKADDR_AVAILABLE 0 # endif #endif +#if MAINSTACKADDR_AVAILABLE && !defined(get_main_stack) +# define get_main_stack(addr, size) get_stack(addr, size) +#endif #ifdef STACKADDR_AVAILABLE /* @@ -892,7 +895,12 @@ native_thread_create(rb_thread_t *th) thread_debug("create (use cached thread): %p\n", (void *)th); } else { +#ifdef HAVE_PTHREAD_ATTR_INIT pthread_attr_t attr; + pthread_attr_t *const attrp = &attr; +#else + pthread_attr_t *const attrp = NULL; +#endif const size_t stack_size = th->vm->default_params.thread_machine_stack_size; const size_t space = space_size(stack_size); diff --git a/version.h b/version.h index eba935ead8..a2bbdadc2e 100644 --- a/version.h +++ b/version.h @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.0.0" #define RUBY_RELEASE_DATE "2014-07-03" -#define RUBY_PATCHLEVEL 511 +#define RUBY_PATCHLEVEL 512 #define RUBY_RELEASE_YEAR 2014 #define RUBY_RELEASE_MONTH 7 -- cgit v1.2.3