diff options
author | Nick Clifton <nickc@redhat.com> | 2023-10-02 13:24:05 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2023-10-02 13:24:05 +0100 |
commit | 6a6117ab0ffe18ea984abca84869eae799c1b346 (patch) | |
tree | 7fa0dccd522115cf968d875b61671cd130d8f666 /bfd/peXXigen.c | |
parent | 8f6f3f29653d8396146bd93a5c63925a13dd047a (diff) | |
download | gdb-6a6117ab0ffe18ea984abca84869eae799c1b346.zip gdb-6a6117ab0ffe18ea984abca84869eae799c1b346.tar.gz gdb-6a6117ab0ffe18ea984abca84869eae799c1b346.tar.bz2 |
Use bfd_get_current_time in places where it is suitable
Diffstat (limited to 'bfd/peXXigen.c')
-rw-r--r-- | bfd/peXXigen.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c index 2f2968d..641c259 100644 --- a/bfd/peXXigen.c +++ b/bfd/peXXigen.c @@ -839,17 +839,7 @@ _bfd_XXi_only_swap_filehdr_out (bfd * abfd, void * in, void * out) option was chosen. */ if ((pe_data (abfd)->timestamp) == -1) { - time_t now; - char *source_date_epoch; - - /* If the SOURCE_DATE_EPOCH environment variable is - defined then use that as the time, otherwise use - the current time. */ - source_date_epoch = getenv ("SOURCE_DATE_EPOCH"); - if (source_date_epoch) - now = (time_t) strtoll (source_date_epoch, NULL, 10); - else - now = time (NULL); + time_t now = bfd_get_current_time (0); H_PUT_32 (abfd, now, filehdr_out->f_timdat); } else |