summaryrefslogtreecommitdiff
path: root/src/touch.c
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2010-09-16 17:38:00 -0600
committerEric Blake <eblake@redhat.com>2010-09-17 08:42:52 -0600
commit3bb942c4261e6c3f362e0d76fcb23f62bdb44c21 (patch)
treebe0193d9d999817b02cccb7272d8d1c6c032c750 /src/touch.c
parent42681e9e4d3a9a2f3909373294fe76c39efd3991 (diff)
downloadcoreutils-3bb942c4261e6c3f362e0d76fcb23f62bdb44c21.tar.xz
maint: update to latest gnulib
* gnulib: Update to latest. * bootstrap.conf (gnulib_modules): Add fdutimensat. * src/touch.c (touch): Use fdutimensat instead of gl_futimens.
Diffstat (limited to 'src/touch.c')
-rw-r--r--src/touch.c5
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)
{