summaryrefslogtreecommitdiff
path: root/source3/libsmb/libsmb_compat.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb/libsmb_compat.c')
-rw-r--r--source3/libsmb/libsmb_compat.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/libsmb/libsmb_compat.c b/source3/libsmb/libsmb_compat.c
index 83088a14de..3dc60f7240 100644
--- a/source3/libsmb/libsmb_compat.c
+++ b/source3/libsmb/libsmb_compat.c
@@ -303,14 +303,16 @@ int smbc_utimes(const char *fname, struct timeval *tbuf)
#ifdef HAVE_UTIME_H
int smbc_utime(const char *fname, struct utimbuf *utbuf)
{
- struct timeval tv;
+ struct timeval tv[2];
if (utbuf == NULL)
return statcont->utimes(statcont, fname, NULL);
- tv.tv_sec = utbuf->modtime;
- tv.tv_usec = 0;
- return statcont->utimes(statcont, fname, &tv);
+ tv[0].tv_sec = utbuf->actime;
+ tv[1].tv_sec = utbuf->modtime;
+ tv[0].tv_usec = tv[1].tv_usec = 0;
+
+ return statcont->utimes(statcont, fname, tv);
}
#endif