Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix missing C declarations causing compiler warnings
This fixes declarations for ruby-2.0 and newer. rubies < 2.0 don't define ruby/thread.h, so that the warnings are still present there. compiling ../../../../ext/ffi_c/Call.c In file included from ../../../../ext/ffi_c/Call.h:36:0, from ../../../../ext/ffi_c/Function.h:48, from ../../../../ext/ffi_c/Call.c:57: ../../../../ext/ffi_c/Call.c: In function ‘rbffi_do_blocking_call’: ../../../../ext/ffi_c/Thread.h:78:39: warning: implicit declaration of function ‘rb_thread_call_without_gvl’; did you mean ‘rb_thread_wait_for’? [-Wimplicit-function-declaration] # define rbffi_thread_blocking_region rb_thread_call_without_gvl ^ ../../../../ext/ffi_c/Call.c:334:5: note: in expansion of macro ‘rbffi_thread_blocking_region’ rbffi_thread_blocking_region(call_blocking_function, data, (void *) -1, NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ compiling ../../../../ext/ffi_c/Function.c ../../../../ext/ffi_c/Function.c: In function ‘async_cb_event’: ../../../../ext/ffi_c/Function.c:569:9: warning: implicit declaration of function ‘rb_thread_call_without_gvl’; did you mean ‘rb_thread_call_with_gvl’? [-Wimplicit-function-declaration] rb_thread_call_without_gvl(async_cb_wait, &w, async_cb_stop, &w); ^~~~~~~~~~~~~~~~~~~~~~~~~~ rb_thread_call_with_gvl
- Loading branch information