From 793d9c14df163808ba142a9435c2d54eb6ea6df6 Mon Sep 17 00:00:00 2001 From: ngoto Date: Wed, 30 Apr 2014 15:38:31 +0000 Subject: * file.c (FSTATFS): check availability of struct statfs and struct statvfs in addition to fstatfs(2) and fstatvfs(2). This fixes error in Solaris. [Bug #9788] [ruby-dev:48145] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ file.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 67dc1e3a84..eb1fbe90fd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu May 1 00:36:26 2014 Naohisa Goto + + * file.c (FSTATFS): check availability of struct statfs and + struct statvfs in addition to fstatfs(2) and fstatvfs(2). + This fixes error in Solaris. [Bug #9788] [ruby-dev:48145] + Wed Apr 30 19:46:23 2014 Narihiro Nakamura * gc.c (gc_after_sweep): suppress unnecessary expanding heap. diff --git a/file.c b/file.c index bc38dbb3f5..5ba3ba0a84 100644 --- a/file.c +++ b/file.c @@ -92,9 +92,9 @@ typedef struct statvfs statfs_t; #endif #ifndef WITHOUT_STATFS static VALUE rb_statfs_new(const statfs_t *st); -#if defined(HAVE_FSTATFS) +#if defined(HAVE_FSTATFS) && defined(HAVE_STRUCT_STATFS) #define FSTATFS(f, s) fstatfs((f), (s)) -#elif defined(HAVE_FSTATVFS) +#elif defined(HAVE_FSTATVFS) && defined(HAVE_STRUCT_STATVFS) #define FSTATFS(f, s) fstatvfs((f), (s)) #endif #endif -- cgit v1.2.3