diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/-test-/file/extconf.rb | 2 | ||||
-rw-r--r-- | ext/-test-/file/fs.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/ext/-test-/file/extconf.rb b/ext/-test-/file/extconf.rb index be4a2fbdeb..87a2f4a205 100644 --- a/ext/-test-/file/extconf.rb +++ b/ext/-test-/file/extconf.rb @@ -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) diff --git a/ext/-test-/file/fs.c b/ext/-test-/file/fs.c index 1ab067e1b2..d93ce27945 100644 --- a/ext/-test-/file/fs.c +++ b/ext/-test-/file/fs.c @@ -7,6 +7,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; |