[binutils-gdb] build error with 32-bit host and 64-bit time_t

Alan Modra amodra@sourceware.org
Fri Apr 18 09:51:34 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=14138ca4d4be7450c22083a9dcd2a66a60d9de23

commit 14138ca4d4be7450c22083a9dcd2a66a60d9de23
Author: Alan Modra <amodra@gmail.com>
Date:   Fri Apr 18 18:31:30 2025 +0930

    build error with 32-bit host and 64-bit time_t
    
    A fix for commit c4fce3ef2927.

Diff:
---
 ld/ldmain.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ld/ldmain.c b/ld/ldmain.c
index 716272b02ab..67c60c3f80d 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -563,8 +563,8 @@ report_phases (FILE * file, time_t * start, char ** argv)
       COLUMN_ENTRY (pd->duration, "ld", 1);
 #if defined (HAVE_GETRUSAGE)
       COLUMN_ENTRY (pd->use.ru_maxrss, "ld", 2);
-      COLUMN_ENTRY (pd->use.ru_utime.tv_sec, "ld", 3);
-      COLUMN_ENTRY (pd->use.ru_stime.tv_sec, "ld", 4);
+      COLUMN_ENTRY ((int64_t) pd->use.ru_utime.tv_sec, PRId64, 3);
+      COLUMN_ENTRY ((int64_t) pd->use.ru_stime.tv_sec, PRId64, 4);
 #endif
       fprintf (file, "\n");
     }


More information about the Binutils-cvs mailing list