summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-10-03 22:59:22 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-10-03 23:18:34 +0900
commit8218cb73ba0b4c07d977fbf6e9fd02e1928288b7 (patch)
treefadab2b48ef81357f6c9f4953285d9c08fbd6009 /file.c
parentbc6c1e0e25a9dc80382e2ffb8559bbe171e0400e (diff)
downloadruby-8218cb73ba0b4c07d977fbf6e9fd02e1928288b7.tar.gz
[Bug #19034] No runtime check for `utimensat` if unavailable
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/file.c b/file.c
index 3051d8e017..cc51373d46 100644
--- a/file.c
+++ b/file.c
@@ -2873,7 +2873,9 @@ utime_failed(struct apply_arg *aa)
#if defined(HAVE_UTIMES)
-# if defined(__APPLE__) && \
+# if !defined(HAVE_UTIMENSAT)
+/* utimensat() is not found, runtime check is not needed */
+# elif defined(__APPLE__) && \
(!defined(MAC_OS_X_VERSION_13_0) || (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_13_0))
# if defined(__has_attribute) && __has_attribute(availability)