aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-24 12:24:27 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-24 12:24:27 +0000
commitc3ad34c7fa7222ef6003ca83a3d9b17c80caa9ef (patch)
tree412d0056f7f50370f2e3971a9ea41fb4bca864cc /file.c
parent9a15c7c84a7871bf05e4d136df72ab5cc03cd6ca (diff)
downloadruby-c3ad34c7fa7222ef6003ca83a3d9b17c80caa9ef.tar.gz
ruby.c: replace with real path
* ruby.c (dladdr_path): replace the executable path with symlinked real path. dladdr(3) on Linux returns the argv[0] as dli_fname instead of the real path, for a symbol defined in the executable file itself. [Bug #10776] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/file.c b/file.c
index dd05bb7038..01370030fe 100644
--- a/file.c
+++ b/file.c
@@ -2745,7 +2745,7 @@ rb_file_s_symlink(VALUE klass, VALUE from, VALUE to)
#endif
#ifdef HAVE_READLINK
-static VALUE rb_readlink(VALUE path);
+VALUE rb_readlink(VALUE path);
/*
* call-seq:
@@ -2764,7 +2764,7 @@ rb_file_s_readlink(VALUE klass, VALUE path)
return rb_readlink(path);
}
-static VALUE
+VALUE
rb_readlink(VALUE path)
{
int size = 100;