Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146495788
D7632.id19634.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D7632.id19634.diff
View Options
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(×tamp) != 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(×tamp) != 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
Details
Attached
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)
Attached To
Mode
D7632: elfcopy: use elftc_timestamp, to support SOURCE_DATE_EPOCH
Attached
Detach File
Event Timeline
Log In to Comment