summaryrefslogtreecommitdiff
path: root/ext/-test-/dir
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-30 03:18:08 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-30 03:18:08 +0000
commit5cc1d57c3957ecabe02c5ad79dd75c523457187f (patch)
tree3b6318b986330bb1969b0af05fafc45e9367fc06 /ext/-test-/dir
parent279aaaf9a43fb39a2ce407724b548e02bc4c887c (diff)
fileno.c: suppress warnings
* ext/-test-/dir/fileno.c (dir_check): suppress unused-function warnings, used only when dirfd() is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/-test-/dir')
-rw-r--r--ext/-test-/dir/fileno.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/-test-/dir/fileno.c b/ext/-test-/dir/fileno.c
index 7a451bc1a74..48729429737 100644
--- a/ext/-test-/dir/fileno.c
+++ b/ext/-test-/dir/fileno.c
@@ -32,6 +32,7 @@ struct dir_data {
rb_encoding *enc;
};
+#ifdef HAVE_DIRFD
static void *
rb_check_typeddata0(VALUE obj /*, const rb_data_type_t *data_type */)
{
@@ -71,6 +72,7 @@ dir_check(VALUE dir)
if (!dirp->dir) dir_closed();
return dirp;
}
+#endif
#define GetDIR(obj, dirp) ((dirp) = dir_check(obj))