Suppress -Wdiscarded-qualifiers
warning where fchdir
is unusable
This commit is contained in:
parent
b2e848193a
commit
05b7bbecc6
Notes:
git
2023-04-04 03:30:56 +00:00
5
dir.c
5
dir.c
@ -1277,9 +1277,8 @@ dir_chdir(VALUE dir)
|
||||
#if defined(HAVE_FCHDIR) && defined(HAVE_DIRFD) && HAVE_FCHDIR && HAVE_DIRFD
|
||||
dir_s_fchdir(rb_cDir, dir_fileno(dir));
|
||||
#else
|
||||
struct dir_data *dirp;
|
||||
dirp = dir_get(dir);
|
||||
dir_s_chdir(1, &dirp->path, rb_cDir);
|
||||
VALUE path = dir_get(dir)->path;
|
||||
dir_s_chdir(1, &path, rb_cDir);
|
||||
#endif
|
||||
|
||||
return Qnil;
|
||||
|
Loading…
x
Reference in New Issue
Block a user