summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2020-07-08 12:59:36 -0700
committerKevin McCarthy <kevin@8t8.us>2020-07-08 12:59:36 -0700
commitb108d1b700f6eff6f83a7735eabd1d632b1ad4fb (patch)
tree8d96e6af496bf8b21d95219a8a5dd6c5ba608c2f
parentb48f8e1e1510ff1560921a912aa124043a936f05 (diff)
parent222bd804148dc2bdb5e79df91d61fc3a28926f4f (diff)
Merge branch 'stable'
-rw-r--r--buffy.c5
-rw-r--r--mbox.c4
-rw-r--r--mx.c4
3 files changed, 7 insertions, 6 deletions
diff --git a/buffy.c b/buffy.c
index 706fc0d0..cfb163bf 100644
--- a/buffy.c
+++ b/buffy.c
@@ -42,6 +42,7 @@
#endif
#include <string.h>
+#include <fcntl.h>
#include <sys/stat.h>
#include <dirent.h>
#include <utime.h>
@@ -172,7 +173,7 @@ void mutt_buffy_cleanup (const char *buf, struct stat *st)
ts[0].tv_nsec = UTIME_OMIT;
ts[1].tv_sec = 0;
ts[1].tv_nsec = UTIME_NOW;
- utimensat (0, buf, ts, 0);
+ utimensat (AT_FDCWD, buf, ts, 0);
#else
ut.actime = st->st_atime;
ut.modtime = time (NULL);
@@ -186,7 +187,7 @@ void mutt_buffy_cleanup (const char *buf, struct stat *st)
ts[0].tv_nsec = UTIME_NOW;
ts[1].tv_sec = 0;
ts[1].tv_nsec = UTIME_NOW;
- utimensat (0, buf, ts, 0);
+ utimensat (AT_FDCWD, buf, ts, 0);
#else
utime (buf, NULL);
#endif
diff --git a/mbox.c b/mbox.c
index 9abb163d..10361184 100644
--- a/mbox.c
+++ b/mbox.c
@@ -115,7 +115,7 @@ int mmdf_parse_mailbox (CONTEXT *ctx)
ts[0].tv_nsec = UTIME_NOW;
ts[1].tv_sec = 0;
ts[1].tv_nsec = UTIME_OMIT;
- utimensat (0, ctx->path, ts, 0);
+ utimensat (AT_FDCWD, ctx->path, ts, 0);
#else
newtime.actime = time (NULL);
newtime.modtime = sb.st_mtime;
@@ -277,7 +277,7 @@ int mbox_parse_mailbox (CONTEXT *ctx)
ts[0].tv_nsec = UTIME_NOW;
ts[1].tv_sec = 0;
ts[1].tv_nsec = UTIME_OMIT;
- utimensat (0, ctx->path, ts, 0);
+ utimensat (AT_FDCWD, ctx->path, ts, 0);
#else
newtime.actime = time (NULL);
newtime.modtime = sb.st_mtime;
diff --git a/mx.c b/mx.c
index c2fd724c..187efea5 100644
--- a/mx.c
+++ b/mx.c
@@ -468,7 +468,7 @@ int mx_get_magic (const char *path)
#ifdef HAVE_UTIMENSAT
mutt_get_stat_timespec (&ts[0], &st, MUTT_STAT_ATIME);
mutt_get_stat_timespec (&ts[1], &st, MUTT_STAT_MTIME);
- utimensat (0, path, ts, 0);
+ utimensat (AT_FDCWD, path, ts, 0);
#else
times.actime = st.st_atime;
times.modtime = st.st_mtime;
@@ -699,7 +699,7 @@ void mx_fastclose_mailbox (CONTEXT *ctx)
#ifdef HAVE_UTIMENSAT
ts[0] = ctx->atime;
ts[1] = ctx->mtime;
- utimensat (0, ctx->path, ts, 0);
+ utimensat (AT_FDCWD, ctx->path, ts, 0);
#else
ut.actime = ctx->atime.tv_sec;
ut.modtime = ctx->mtime.tv_sec;