diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/touch.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/touch.c b/src/touch.c index e5224a45a..290f74300 100644 --- a/src/touch.c +++ b/src/touch.c @@ -163,8 +163,9 @@ touch (const char *file) t = NULL; } - ok = ((no_dereference && fd == -1) ? lutimens (file, t) - : gl_futimens (fd, (fd == STDOUT_FILENO ? NULL : file), t)) == 0; + ok = (fdutimensat (AT_FDCWD, (fd == STDOUT_FILENO ? NULL : file), fd, t, + (no_dereference && fd == -1) ? AT_SYMLINK_NOFOLLOW : 0) + == 0); if (fd == STDIN_FILENO) { |