1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* file.c (rb_home_dir): checks if HAVE_PWD_H. [ruby-dev:38049]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-02-19 04:56:01 +00:00
parent 90f84988fc
commit 4caba4ebd0
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Thu Feb 19 13:56:00 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (rb_home_dir): checks if HAVE_PWD_H. [ruby-dev:38049]
Thu Feb 19 08:45:48 2009 TAKANO Mitsuhiro (takano32) <tak@no32.tk>
* ext/socket/rubysocket.h: add "#include <sys/stat.h>"

2
file.c
View file

@ -2621,7 +2621,7 @@ rb_home_dir(const char *user, VALUE result)
memcpy(buf = RSTRING_PTR(result), dir, dirlen);
}
else {
#ifdef HAVE_GETPWENT
#ifdef HAVE_PWD_H
struct passwd *pwPtr = getpwnam(user);
if (!pwPtr) {
endpwent();