summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ruby.c b/ruby.c
index 0fc5247..2fbd48f 100644
--- a/ruby.c
+++ b/ruby.c
@@ -412,7 +412,11 @@ ruby_init_loadpath_safe(int safe_level)
p = strrchr(libpath, '/');
if (p) {
static const char bindir[] = "/bin";
+#ifdef LIBDIR_BASENAME
+ static const char libdir[] = "/"LIBDIR_BASENAME;
+#else
static const char libdir[] = "/lib";
+#endif
const ptrdiff_t bindir_len = (ptrdiff_t)sizeof(bindir) - 1;
const ptrdiff_t libdir_len = (ptrdiff_t)sizeof(libdir) - 1;
*p = 0;