void undo_last_backup (void);
int deref_stat (bool deref, char const *name, struct stat *buf);
-int fd_utimensat (int fd, int parentfd, char const *file,
- struct timespec const ts[2], int atflag);
extern int chdir_current;
int chdir_arg (char const *dir);
ts[0].tv_nsec = UTIME_OMIT;
ts[1] = st->mtime;
- if (fd_utimensat (fd, AT_FDCWD, file_name, ts, atflag) == 0)
+ if (fdutimensat (fd, AT_FDCWD, file_name, ts, atflag) == 0)
{
if (incremental_option)
check_time (file_name, ts[0]);
return deref ? stat (name, buf) : lstat (name, buf);
}
-/* Use futimens if possible, utimensat otherwise. */
-int
-fd_utimensat (int fd, int parentfd, char const *file,
- struct timespec const ts[2], int atflag)
-{
- if (0 <= fd)
- {
- int result = futimens (fd, ts);
- if (! (result < 0 && errno == ENOSYS))
- return result;
- }
-
- return utimensat (parentfd, file, ts, atflag);
-}
-
/* Set FD's (i.e., assuming the working directory is PARENTFD, FILE's)
access time to ATIME. ATFLAG controls symbolic-link following, in
the style of openat. */
struct timespec ts[2];
ts[0] = atime;
ts[1].tv_nsec = UTIME_OMIT;
- return fd_utimensat (fd, parentfd, file, ts, atflag);
+ return fdutimensat (fd, parentfd, file, ts, atflag);
}
/* A description of a working directory. */