summaryrefslogtreecommitdiff
path: root/pkg/openbsd/patch/0037-pax-Use-POSIX-struct-stat-fields-for-high-resolution.patch
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2022-04-22 13:03:31 -0700
committerMichael Forney <mforney@mforney.org>2022-09-06 23:42:08 -0700
commit569b21ba94f76e8d419fbc8375daef73cdb43583 (patch)
tree8fd0130c8b4fd82647570dd4a374c69b1638ebac /pkg/openbsd/patch/0037-pax-Use-POSIX-struct-stat-fields-for-high-resolution.patch
parent00fe346cc1ce9b97dbfeca089b3afc97f0353bfe (diff)
openbsd: Update to 7.1
Diffstat (limited to 'pkg/openbsd/patch/0037-pax-Use-POSIX-struct-stat-fields-for-high-resolution.patch')
-rw-r--r--pkg/openbsd/patch/0037-pax-Use-POSIX-struct-stat-fields-for-high-resolution.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/pkg/openbsd/patch/0037-pax-Use-POSIX-struct-stat-fields-for-high-resolution.patch b/pkg/openbsd/patch/0037-pax-Use-POSIX-struct-stat-fields-for-high-resolution.patch
new file mode 100644
index 00000000..18d2ca23
--- /dev/null
+++ b/pkg/openbsd/patch/0037-pax-Use-POSIX-struct-stat-fields-for-high-resolution.patch
@@ -0,0 +1,46 @@
+From 82646d38665109ec5f0753ba384da94d529bbbe9 Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Wed, 27 Apr 2022 19:57:54 -0700
+Subject: [PATCH] pax: Use POSIX struct stat fields for high resolution
+ timestamps
+
+---
+ bin/pax/tar.c | 15 +++++----------
+ 1 file changed, 5 insertions(+), 10 deletions(-)
+
+diff --git a/bin/pax/tar.c b/bin/pax/tar.c
+index 1f4012123c3..7ede7938c3d 100644
+--- a/bin/pax/tar.c
++++ b/bin/pax/tar.c
+@@ -417,8 +417,7 @@ tar_rd(ARCHD *arcn, char *buf)
+ arcn->sb.st_mtime = INT_MAX; /* XXX 2038 */
+ 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
+@@ -795,14 +794,10 @@ reset:
+ else
+ 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;
+- }
+- if (arcn->sb.st_atime == 0) {
+- arcn->sb.st_atime = arcn->sb.st_mtime;
+- arcn->sb.st_atimensec = arcn->sb.st_mtimensec;
+- }
++ if (arcn->sb.st_ctime == 0)
++ arcn->sb.st_ctim = arcn->sb.st_mtim;
++ if (arcn->sb.st_atime == 0)
++ arcn->sb.st_atim = arcn->sb.st_mtim;
+
+ /*
+ * If we can find the ascii names for gname and uname in the password
+--
+2.35.1
+