Index: file.c =================================================================== --- file.c (revision 39716) +++ file.c (working copy) @@ -305,8 +305,8 @@ stat_new_0(VALUE klass, struct stat *st) return TypedData_Wrap_Struct(klass, &stat_data_type, nst); } -static VALUE -stat_new(struct stat *st) +VALUE +rb_stat_new(struct stat *st) { return stat_new_0(rb_cStat, st); } @@ -917,7 +917,7 @@ rb_file_s_stat(VALUE klass, VALUE fname) if (rb_stat(fname, &st) < 0) { rb_sys_fail_path(fname); } - return stat_new(&st); + return rb_stat_new(&st); } /* @@ -945,7 +945,7 @@ rb_io_stat(VALUE obj) if (fstat(fptr->fd, &st) == -1) { rb_sys_fail_path(fptr->pathv); } - return stat_new(&st); + return rb_stat_new(&st); } /* @@ -974,7 +974,7 @@ rb_file_s_lstat(VALUE klass, VALUE fname if (lstat(StringValueCStr(fname), &st) == -1) { rb_sys_fail_path(fname); } - return stat_new(&st); + return rb_stat_new(&st); #else return rb_file_s_stat(klass, fname); #endif @@ -1009,7 +1009,7 @@ rb_file_lstat(VALUE obj) if (lstat(RSTRING_PTR(path), &st) == -1) { rb_sys_fail_path(fptr->pathv); } - return stat_new(&st); + return rb_stat_new(&st); #else return rb_io_stat(obj); #endif Index: include/ruby/intern.h =================================================================== --- include/ruby/intern.h (revision 39716) +++ include/ruby/intern.h (working copy) @@ -31,6 +31,7 @@ extern "C" { #else # include #endif +#include #include "ruby/st.h" #if defined __GNUC__ && __GNUC__ >= 4 @@ -434,6 +435,7 @@ VALUE rb_find_file(VALUE); VALUE rb_file_directory_p(VALUE,VALUE); VALUE rb_str_encode_ospath(VALUE); int rb_is_absolute_path(const char *); +VALUE rb_stat_new(struct stat *); /* gc.c */ NORETURN(void rb_memerror(void)); int rb_during_gc(void);