aboutsummaryrefslogtreecommitdiff
path: root/binutils/ar.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-10-26 08:08:21 +0000
committerJakub Jelinek <jakub@redhat.com>2004-10-26 08:08:21 +0000
commitb3f21e4a58cbbeca439d4270f4234ef565a59030 (patch)
tree333556759e41fb29efc9f8354cf4b540f681c4a8 /binutils/ar.c
parentfcf640ecb2cd74b58574a9161fa17e420fb1f69a (diff)
downloadgdb-b3f21e4a58cbbeca439d4270f4234ef565a59030.zip
gdb-b3f21e4a58cbbeca439d4270f4234ef565a59030.tar.gz
gdb-b3f21e4a58cbbeca439d4270f4234ef565a59030.tar.bz2
* ar.c (extract_file): Set atime to mtime for ar xo.
Diffstat (limited to 'binutils/ar.c')
-rw-r--r--binutils/ar.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/binutils/ar.c b/binutils/ar.c
index ab54ace..6cc7941 100644
--- a/binutils/ar.c
+++ b/binutils/ar.c
@@ -935,7 +935,12 @@ extract_file (bfd *abfd)
chmod (bfd_get_filename (abfd), buf.st_mode);
if (preserve_dates)
- set_times (bfd_get_filename (abfd), &buf);
+ {
+ /* Set access time to modification time. Only st_mtime is
+ initialized by bfd_stat_arch_elt. */
+ buf.st_atime = buf.st_mtime;
+ set_times (bfd_get_filename (abfd), &buf);
+ }
free (cbuf);
}