summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-30 15:38:31 +0000
committerngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-30 15:38:31 +0000
commit793d9c14df163808ba142a9435c2d54eb6ea6df6 (patch)
treef209b491b37f23d1d4e00e3c97482326571da531
parent795a6b23745305fe089983cf7a21f3f5820d6639 (diff)
* 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
-rw-r--r--ChangeLog6
-rw-r--r--file.c4
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 <ngotogenome@gmail.com>
+
+ * 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 <authornari@gmail.com>
* 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