mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user