From f25cf99679709af18d61fd3159e6bb41435b064f Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sat, 28 Feb 2015 15:13:19 -0700 Subject: [PATCH] Our utimes() emulation support futime() too. --- src/sesh.c | 2 +- src/sudo_edit.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sesh.c b/src/sesh.c index 402f251c0..78eab84b4 100644 --- a/src/sesh.c +++ b/src/sesh.c @@ -209,7 +209,7 @@ sesh_sudoedit(int argc, char *argv[]) mtim_get(&sb, ×[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); diff --git a/src/sudo_edit.c b/src/sudo_edit.c index acacfde92..be71fb501 100644 --- a/src/sudo_edit.c +++ b/src/sudo_edit.c @@ -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); -- 2.40.0