Page MenuHomeFreeBSD

D7632.id19634.diff
No OneTemporary

D7632.id19634.diff

Index: elfcopy/archive.c
===================================================================
--- elfcopy/archive.c
+++ elfcopy/archive.c
@@ -440,6 +440,7 @@
struct archive *a;
struct archive_entry *entry;
struct ar_obj *obj;
+ time_t timestamp;
int nr;
if ((a = archive_write_new()) == NULL)
@@ -450,7 +451,9 @@
/* Write the archive symbol table, even if it's empty. */
entry = archive_entry_new();
archive_entry_copy_pathname(entry, "/");
- archive_entry_set_mtime(entry, time(NULL), 0);
+ if (elftc_timestamp(&timestamp) != 0)
+ err(EXIT_FAILURE, "elftc_timestamp");
+ archive_entry_set_mtime(entry, timestamp, 0);
archive_entry_set_size(entry, (ecp->s_cnt + 1) * sizeof(uint32_t) +
ecp->s_sn_sz);
AC(archive_write_header(a, entry));
Index: elfcopy/pe.c
===================================================================
--- elfcopy/pe.c
+++ elfcopy/pe.c
@@ -54,6 +54,7 @@
PE_Buffer *pb;
const char *name;
size_t indx;
+ time_t timestamp;
int elferr;
if (ecp->otf == ETF_EFI || ecp->oem == EM_X86_64)
@@ -89,7 +90,9 @@
pch.ch_machine = IMAGE_FILE_MACHINE_UNKNOWN;
break;
}
- pch.ch_timestamp = (uint32_t) time(NULL);
+ if (elftc_timestamp(&timestamp) != 0)
+ err(EXIT_FAILURE, "elftc_timestamp");
+ pch.ch_timestamp = (uint32_t) timestamp;
if (pe_update_coff_header(pe, &pch) < 0)
err(EXIT_FAILURE, "pe_update_coff_header() failed");

File Metadata

Mime Type
text/plain
Expires
Wed, Mar 4, 3:49 AM (12 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29225598
Default Alt Text
D7632.id19634.diff (1 KB)

Event Timeline