This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
use just futimes (or equivalent) instead of utimes (or equivalent),
and fail if on an old system without futimes (or equivalent).
If TIMESPEC is null, set the time stamps to the current time.
use just futimes (or equivalent) instead of utimes (or equivalent),
and fail if on an old system without futimes (or equivalent).
If TIMESPEC is null, set the time stamps to the current time.
-fdutimensat (int dir, char const *file, int fd, struct timespec const ts[2])
+fdutimensat (int fd, int dir, char const *file, struct timespec const ts[2],
+ int atflag)
{
int result = 1;
if (0 <= fd)
result = futimens (fd, ts);
if (file && (fd < 0 || (result == -1 && errno == ENOSYS)))
{
int result = 1;
if (0 <= fd)
result = futimens (fd, ts);
if (file && (fd < 0 || (result == -1 && errno == ENOSYS)))
- result = utimensat (dir, file, ts, 0);
+ result = utimensat (dir, file, ts, atflag);