diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2015-04-06 13:34:34 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-04-06 13:34:34 -0700 |
commit | 0402678d3bdc8a5b5950ddff077c8864622700c8 (patch) | |
tree | 504c2c3021863d7c7c4d13982f7b85772f1f933b /ext/ffi_yajl/ext | |
parent | 9a536029c699ee501d9278577a300a5ef3d147dd (diff) | |
download | ffi-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.c | 4 |
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; } |