summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-02-24 11:57:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-02-24 11:57:18 +0000
commit23a8183bea8dda2d7528b57f2e0c8bc31162db3e (patch)
tree8e64e549c56714f87ef0a65f4f80628ca7d4bf03 /file.c
parenta582007e3611e1d6e1d57b697391be74dc03c2ac (diff)
Check stx_btime in struct statx
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/file.c b/file.c
index e24cf68fc6..fd68d41081 100644
--- a/file.c
+++ b/file.c
@@ -1114,9 +1114,10 @@ stat_without_gvl(const char *path, struct stat *st)
RUBY_UBF_IO, NULL);
}
-#if !defined(HAVE_STAT_BIRTHTIME) && defined(HAVE_STATX)
+#if !defined(HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC) && \
+ defined(HAVE_STRUCT_STATX_STX_BTIME)
-# if HAVE_STATX == 0
+# ifndef HAVE_STATX
# ifdef HAVE_SYSCALL_H
# include <syscall.h>
# elif defined HAVE_SYS_SYSCALL_H
@@ -2402,7 +2403,7 @@ rb_file_ctime(VALUE obj)
*
*/
-#if defined(HAVE_STAT_BIRTHTIME) || defined(HAVE_STATX)
+#if defined(HAVE_STAT_BIRTHTIME)
RUBY_FUNC_EXPORTED VALUE
rb_file_s_birthtime(VALUE klass, VALUE fname)
{