summaryrefslogtreecommitdiff
path: root/ext/ffi_yajl/ext
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2015-04-06 13:34:34 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2015-04-06 13:34:34 -0700
commit0402678d3bdc8a5b5950ddff077c8864622700c8 (patch)
tree504c2c3021863d7c7c4d13982f7b85772f1f933b /ext/ffi_yajl/ext
parent9a536029c699ee501d9278577a300a5ef3d147dd (diff)
downloadffi-yajl-0402678d3bdc8a5b5950ddff077c8864622700c8.tar.gz
fixing libname guessing logic
run through multiple different possible library names and extensions, favoring the libyajl2 gem versions first.
Diffstat (limited to 'ext/ffi_yajl/ext')
-rw-r--r--ext/ffi_yajl/ext/dlopen/dlopen.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/ffi_yajl/ext/dlopen/dlopen.c b/ext/ffi_yajl/ext/dlopen/dlopen.c
index 7330763..eb81a21 100644
--- a/ext/ffi_yajl/ext/dlopen/dlopen.c
+++ b/ext/ffi_yajl/ext/dlopen/dlopen.c
@@ -26,7 +26,9 @@
static VALUE mFFI_Yajl, mDlopen, mExt;
static VALUE mDlopen_dlopen(VALUE self, VALUE file) {
- dlopen(RSTRING_PTR(file), RTLD_NOW|RTLD_GLOBAL);
+ if (dlopen(RSTRING_PTR(file), RTLD_NOW|RTLD_GLOBAL) == NULL) {
+ rb_raise(rb_eArgError, "%s", dlerror());
+ }
return Qnil;
}