ruby-changes:38342
From: odaira <ko1@a...>
Date: Sun, 3 May 2015 22:55:13 +0900 (JST)
Subject: [ruby-changes:38342] odaira:r50423 (trunk): * ext/-test-/file/fs.c: need to include sys/statvfs.h
odaira 2015-05-03 22:54:54 +0900 (Sun, 03 May 2015) New Revision: 50423 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50423 Log: * 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 Modified files: trunk/ChangeLog trunk/ext/-test-/file/extconf.rb trunk/ext/-test-/file/fs.c Index: ChangeLog =================================================================== --- ChangeLog (revision 50422) +++ ChangeLog (revision 50423) @@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun May 3 22:40:06 2015 Rei Odaira <Rei.Odaira@g...> + + * 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@r...> * lib/yaml.rb: fix typo. [ci skip][fix GH-890] Index: ext/-test-/file/extconf.rb =================================================================== --- ext/-test-/file/extconf.rb (revision 50422) +++ ext/-test-/file/extconf.rb (revision 50423) @@ -6,7 +6,7 @@ if have_type("struct statfs", headers) https://github.com/ruby/ruby/blob/trunk/ext/-test-/file/extconf.rb#L6 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) Index: ext/-test-/file/fs.c =================================================================== --- ext/-test-/file/fs.c (revision 50422) +++ ext/-test-/file/fs.c (revision 50423) @@ -10,6 +10,9 @@ https://github.com/ruby/ruby/blob/trunk/ext/-test-/file/fs.c#L10 #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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/