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

* ext/-test-/file/fs.c: need to include sys/statvfs.h

to use statvfs().

* ext/-test-/file/extconf.rb: check the existence of
  sys/statvfs.h

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
odaira 2015-05-03 13:54:54 +00:00
parent 9a2c3fd65e
commit fadd0160d0
3 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,11 @@
Sun May 3 22:40:06 2015 Rei Odaira <Rei.Odaira@gmail.com>
* ext/-test-/file/fs.c: need to include sys/statvfs.h
to use statvfs().
* ext/-test-/file/extconf.rb: check the existence of
sys/statvfs.h
Sun May 3 21:59:48 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
* lib/yaml.rb: fix typo. [ci skip][fix GH-890]

View file

@ -6,7 +6,7 @@ if have_type("struct statfs", headers)
have_struct_member("struct statfs", "f_type", headers)
end
headers = %w[sys/statvfs.h]
headers = %w[sys/statvfs.h].select {|h| have_header(h)}
if have_type("struct statvfs", headers)
have_struct_member("struct statvfs", "f_fstypename", headers)
have_struct_member("struct statvfs", "f_basetype", headers)

View file

@ -10,6 +10,9 @@
#ifdef HAVE_SYS_VFS_H
#include <sys/vfs.h>
#endif
#ifdef HAVE_SYS_STATVFS_H
#include <sys/statvfs.h>
#endif
#if defined HAVE_STRUCT_STATFS_F_FSTYPENAME
typedef struct statfs statfs_t;