Our utimes() emulation support futime() too.
This commit is contained in:
@@ -209,7 +209,7 @@ sesh_sudoedit(int argc, char *argv[])
|
|||||||
mtim_get(&sb, ×[0]);
|
mtim_get(&sb, ×[0]);
|
||||||
times[1].tv_sec = times[0].tv_sec;
|
times[1].tv_sec = times[0].tv_sec;
|
||||||
times[1].tv_usec = times[0].tv_usec;
|
times[1].tv_usec = times[0].tv_usec;
|
||||||
#ifdef HAVE_FUTIMES
|
#if defined(HAVE_FUTIMES) || defined(HAVE_FUTIME)
|
||||||
(void) futimes(fd_dst, times);
|
(void) futimes(fd_dst, times);
|
||||||
#else
|
#else
|
||||||
(void) utimes(path_dst, times);
|
(void) utimes(path_dst, times);
|
||||||
|
@@ -244,7 +244,7 @@ sudo_edit_create_tfiles(struct command_details *command_details,
|
|||||||
*/
|
*/
|
||||||
times[0].tv_sec = times[1].tv_sec = tf[j].omtim.tv_sec;
|
times[0].tv_sec = times[1].tv_sec = tf[j].omtim.tv_sec;
|
||||||
times[0].tv_usec = times[1].tv_usec = tf[j].omtim.tv_usec;
|
times[0].tv_usec = times[1].tv_usec = tf[j].omtim.tv_usec;
|
||||||
#ifdef HAVE_FUTIMES
|
#if defined(HAVE_FUTIMES) || defined(HAVE_FUTIME)
|
||||||
(void) futimes(tfd, times);
|
(void) futimes(tfd, times);
|
||||||
#else
|
#else
|
||||||
(void) utimes(tf[j].tfile, times);
|
(void) utimes(tf[j].tfile, times);
|
||||||
|
Reference in New Issue
Block a user