summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-03 05:13:06 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-03 05:13:06 +0000
commit854db4e8654717b86d3f455d6e874cd5ad6fd39d (patch)
tree16669a520228851c38c9c17e69d2ae6b1b010866
parent750e2a7db7bf61b6e28c1472b106112f07048df4 (diff)
* 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
-rw-r--r--thread_pthread.c8
-rw-r--r--version.h2
2 files changed, 9 insertions, 1 deletions
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