]> granicus.if.org Git - sudo/commitdiff
Our utimes() emulation support futime() too.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 28 Feb 2015 22:13:19 +0000 (15:13 -0700)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 28 Feb 2015 22:13:19 +0000 (15:13 -0700)
src/sesh.c
src/sudo_edit.c

index 402f251c03bd03face1f11f497a292b32fa06395..78eab84b4335510dea82fdcd59716d3877471fe5 100644 (file)
@@ -209,7 +209,7 @@ sesh_sudoedit(int argc, char *argv[])
                mtim_get(&sb, &times[0]);
                times[1].tv_sec = times[0].tv_sec;
                times[1].tv_usec = times[0].tv_usec;
-#ifdef HAVE_FUTIMES
+#if defined(HAVE_FUTIMES) || defined(HAVE_FUTIME)
                (void) futimes(fd_dst, times);
 #else
                (void) utimes(path_dst, times);
index acacfde92b508e8a6071db741bf9d7e18ab245a3..be71fb50137c6831e05846c68c5431e2875d518f 100644 (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_usec = times[1].tv_usec = tf[j].omtim.tv_usec;
-#ifdef HAVE_FUTIMES
+#if defined(HAVE_FUTIMES) || defined(HAVE_FUTIME)
        (void) futimes(tfd, times);
 #else
        (void) utimes(tf[j].tfile, times);