From 2a33708a633734c0ac463ce5ec922009475525e6 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 30 Apr 2021 21:08:26 +0200 Subject: ghw: avoid a warning --- ghw/ghwdump.c | 2 +- ghw/libghw.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'ghw') diff --git a/ghw/ghwdump.c b/ghw/ghwdump.c index fa385af52..e6f24ca87 100644 --- a/ghw/ghwdump.c +++ b/ghw/ghwdump.c @@ -292,7 +292,7 @@ main (int argc, char **argv) case ghw_res_snapshot: case ghw_res_cycle: if (flag_disp_time) - printf ("Time is %lld fs\n", hp->snap_time); + printf ("Time is " GHWPRI64 " fs\n", hp->snap_time); if (flag_disp_signals) { if (!filter_done) diff --git a/ghw/libghw.h b/ghw/libghw.h index a6d22d0c0..4668b9252 100644 --- a/ghw/libghw.h +++ b/ghw/libghw.h @@ -30,8 +30,9 @@ in stdint.h. Header inttypes.h includes stdint.h and provides macro for printf and co specifiers. Use it if known to be available. */ -#if defined(__cplusplus) || \ - (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ +#if defined(__cplusplus) || \ + defined(__linux__) || \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ defined(HAVE_INTTYPES_H) /* Use C99 standard header. */ #include -- cgit v1.2.3