the st_*time and (obsolete) st_*timensec members separately.
ok millert@
-/* $OpenBSD: tar.c,v 1.71 2023/06/26 18:00:59 millert Exp $ */
+/* $OpenBSD: tar.c,v 1.72 2023/08/19 04:21:05 guenther Exp $ */
/* $NetBSD: tar.c,v 1.5 1995/03/21 09:07:49 cgd Exp $ */
/*-
arcn->sb.st_mtime = MAX_TIME_T;
else
arcn->sb.st_mtime = val;
- arcn->sb.st_ctime = arcn->sb.st_atime = arcn->sb.st_mtime;
- arcn->sb.st_ctimensec = arcn->sb.st_atimensec = arcn->sb.st_mtimensec;
+ arcn->sb.st_ctim = arcn->sb.st_atim = arcn->sb.st_mtim;
/*
* have to look at the last character, it may be a '/' and that is used
arcn->sb.st_mtime = val;
}
if (arcn->sb.st_ctime == 0) {
- arcn->sb.st_ctime = arcn->sb.st_mtime;
- arcn->sb.st_ctimensec = arcn->sb.st_mtimensec;
+ arcn->sb.st_ctim = arcn->sb.st_mtim;
}
if (arcn->sb.st_atime == 0) {
- arcn->sb.st_atime = arcn->sb.st_mtime;
- arcn->sb.st_atimensec = arcn->sb.st_mtimensec;
+ arcn->sb.st_atim = arcn->sb.st_mtim;
}
/*
#ifndef TIMESTAMP_H
#define TIMESTAMP_H
-/* $OpenBSD: timestamp.h,v 1.10 2013/05/22 12:14:08 espie Exp $ */
+/* $OpenBSD: timestamp.h,v 1.11 2023/08/19 04:21:06 guenther Exp $ */
/*
* Copyright (c) 2001 Marc Espie.
#define ts_set_from_stat(s, t) \
do { \
- (t).tv_sec = (s).st_mtime; \
- (t).tv_nsec = (s).st_mtimensec; \
+ (t) = (s).st_mtim; \
if (is_out_of_date(t)) \
(t).tv_nsec++; \
} while (0)
-/* $OpenBSD: walk.c,v 1.11 2022/01/11 05:34:32 jsg Exp $ */
+/* $OpenBSD: walk.c,v 1.12 2023/08/19 04:21:06 guenther Exp $ */
/* $NetBSD: walk.c,v 1.29 2015/11/25 00:48:49 christos Exp $ */
/*
cur->inode->nlink = 1;
cur->inode->st = *stbuf;
if (Tflag) {
- cur->inode->st.st_atime = stampts;
- cur->inode->st.st_mtime = stampts;
- cur->inode->st.st_ctime = stampts;
- cur->inode->st.st_atimensec = 0;
- cur->inode->st.st_mtimensec = 0;
- cur->inode->st.st_ctimensec = 0;
+ cur->inode->st.st_atim.tv_sec = stampts;
+ cur->inode->st.st_atim.tv_nsec = 0;
+ cur->inode->st.st_mtim = cur->inode->st.st_ctim =
+ cur->inode->st.st_atim;
}
return (cur);
}