Our utimes() emulation support futime() too.

This commit is contained in:
Todd C. Miller
2015-02-28 15:13:19 -07:00
parent 74d3745cc6
commit f25cf99679
2 changed files with 2 additions and 2 deletions

View File

@@ -209,7 +209,7 @@ sesh_sudoedit(int argc, char *argv[])
mtim_get(&sb, &times[0]); mtim_get(&sb, &times[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);

View File

@@ -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);