aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ghw/ghwdump.c2
-rw-r--r--ghw/libghw.h5
2 files changed, 4 insertions, 3 deletions
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 <inttypes.h>