opkg

statically linked package installer
git clone anongit@rnpnr.xyz:opkg.git
Log | Files | Refs | Feed | Submodules | README | LICENSE

0037-pax-Use-POSIX-struct-stat-fields-for-high-resolution.patch (1430B)


      1 From 82646d38665109ec5f0753ba384da94d529bbbe9 Mon Sep 17 00:00:00 2001
      2 From: Michael Forney <mforney@mforney.org>
      3 Date: Wed, 27 Apr 2022 19:57:54 -0700
      4 Subject: [PATCH] pax: Use POSIX struct stat fields for high resolution
      5  timestamps
      6 
      7 ---
      8  bin/pax/tar.c | 15 +++++----------
      9  1 file changed, 5 insertions(+), 10 deletions(-)
     10 
     11 diff --git a/bin/pax/tar.c b/bin/pax/tar.c
     12 index 1f4012123c3..7ede7938c3d 100644
     13 --- a/bin/pax/tar.c
     14 +++ b/bin/pax/tar.c
     15 @@ -417,8 +417,7 @@ tar_rd(ARCHD *arcn, char *buf)
     16  		arcn->sb.st_mtime = INT_MAX;                    /* XXX 2038 */
     17  	else
     18  		arcn->sb.st_mtime = val;
     19 -	arcn->sb.st_ctime = arcn->sb.st_atime = arcn->sb.st_mtime;
     20 -	arcn->sb.st_ctimensec = arcn->sb.st_atimensec = arcn->sb.st_mtimensec;
     21 +	arcn->sb.st_ctim = arcn->sb.st_atim = arcn->sb.st_mtim;
     22  
     23  	/*
     24  	 * have to look at the last character, it may be a '/' and that is used
     25 @@ -795,14 +794,10 @@ reset:
     26  		else
     27  			arcn->sb.st_mtime = val;
     28  	}
     29 -	if (arcn->sb.st_ctime == 0) {
     30 -		arcn->sb.st_ctime = arcn->sb.st_mtime;
     31 -		arcn->sb.st_ctimensec = arcn->sb.st_mtimensec;
     32 -	}
     33 -	if (arcn->sb.st_atime == 0) {
     34 -		arcn->sb.st_atime = arcn->sb.st_mtime;
     35 -		arcn->sb.st_atimensec = arcn->sb.st_mtimensec;
     36 -	}
     37 +	if (arcn->sb.st_ctime == 0)
     38 +		arcn->sb.st_ctim = arcn->sb.st_mtim;
     39 +	if (arcn->sb.st_atime == 0)
     40 +		arcn->sb.st_atim = arcn->sb.st_mtim;
     41  
     42  	/*
     43  	 * If we can find the ascii names for gname and uname in the password
     44 -- 
     45 2.35.1
     46