summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/ruby/optional/capi/ext/thread_spec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/ruby/optional/capi/ext/thread_spec.c b/spec/ruby/optional/capi/ext/thread_spec.c
index 80e9392488..be812d796f 100644
--- a/spec/ruby/optional/capi/ext/thread_spec.c
+++ b/spec/ruby/optional/capi/ext/thread_spec.c
@@ -159,10 +159,10 @@ static void *new_thread_check(void *args) {
static VALUE thread_spec_ruby_native_thread_p_new_thread(VALUE self) {
#ifndef _WIN32
pthread_t t;
- VALUE *result = &true_result;
+ void *result = &true_result;
pthread_create(&t, NULL, new_thread_check, NULL);
- pthread_join(t, (void **)&result);
- return *result;
+ pthread_join(t, &result);
+ return *(VALUE *)result;
#else
return Qfalse;
#endif