summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--file.c2
-rw-r--r--internal.h3
-rw-r--r--ruby.c3
3 files changed, 4 insertions, 4 deletions
diff --git a/file.c b/file.c
index 98bd8d2..8d8f1c9 100644
--- a/file.c
+++ b/file.c
@@ -2786,8 +2786,6 @@ rb_file_s_symlink(VALUE klass, VALUE from, VALUE to)
#endif
#ifdef HAVE_READLINK
-VALUE rb_readlink(VALUE path, rb_encoding *enc);
-
/*
* call-seq:
* File.readlink(link_name) -> file_name
diff --git a/internal.h b/internal.h
index a1eadfa..f352a95 100644
--- a/internal.h
+++ b/internal.h
@@ -1266,6 +1266,9 @@ VALUE rb_str2big_gmp(VALUE arg, int base, int badcheck);
int rb_bug_reporter_add(void (*func)(FILE *, void *), void *data);
/* file.c (export) */
+#ifdef HAVE_READLINK
+VALUE rb_readlink(VALUE path, rb_encoding *enc);
+#endif
#ifdef __APPLE__
VALUE rb_str_normalize_ospath(const char *ptr, long len);
#endif
diff --git a/ruby.c b/ruby.c
index d74451f..a6f5ca1 100644
--- a/ruby.c
+++ b/ruby.c
@@ -382,9 +382,8 @@ dladdr_path(const void* addr)
}
#ifdef __linux__
else if (dli.dli_fname == origarg.argv[0]) {
- VALUE rb_readlink(VALUE);
fname = rb_str_new_cstr("/proc/self/exe");
- path = rb_readlink(fname);
+ path = rb_readlink(fname, NULL);
}
#endif
else {