mruby-io: conditionally compile mrb_lstat for symlink support

only define mrb_lstat when symbolic link macros are available. on
windows/mingw, symlinks are not supported and the function is unused,
causing -Wunused-function warning.

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-10-16 16:56:42 +09:00
parent eba41be3a2
commit 3d1c4981e7
+2
View File
@@ -54,11 +54,13 @@ mrb_stat(mrb_state *mrb, mrb_value obj, mrb_io_stat *st)
return mrb_stat0(mrb, obj, st, 0);
}
#if defined(S_ISLNK) || defined(_S_ISLNK) || defined(S_IFLNK) || defined(_S_IFLNK)
static int
mrb_lstat(mrb_state *mrb, mrb_value obj, mrb_io_stat *st)
{
return mrb_stat0(mrb, obj, st, 1);
}
#endif
/*
* call-seq: