summaryrefslogtreecommitdiff
path: root/lib/profile
diff options
context:
space:
mode:
authorKaelyn Uhrain <rikka@google.com>2014-01-07 00:29:19 +0000
committerKaelyn Uhrain <rikka@google.com>2014-01-07 00:29:19 +0000
commitd1b5d3b0e885ef057643fcea99bff8b6cce04b93 (patch)
treee4d8679426452118f4e1e486c5f63c9955034243 /lib/profile
parente7778e08878d0c61903205428eeb131db9d11b3c (diff)
downloadcompiler-rt-d1b5d3b0e885ef057643fcea99bff8b6cce04b93.tar.gz
Explicitly enable PRIu64 by defining __STDC_FORMAT_MACROS if it isn't
yet defined. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@198650 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile')
-rw-r--r--lib/profile/PGOProfiling.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/profile/PGOProfiling.c b/lib/profile/PGOProfiling.c
index 737ba79a7..310801b67 100644
--- a/lib/profile/PGOProfiling.c
+++ b/lib/profile/PGOProfiling.c
@@ -10,6 +10,12 @@
#include <stdio.h>
#include <stdlib.h>
+// Explicitly request that the format macros like PRIu64 be enabled if they
+// haven't already been enabled.
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS 1
+#endif
+
#if !defined(__APPLE__)
#include <inttypes.h>
#endif