[compiler-rt] [compiler-rt] Define `__STDC_FORMAT_MACROS` to ensure `PRId64` is available (PR #102980)

Mosè Giordano via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 12 15:27:06 PDT 2024


https://github.com/giordano updated https://github.com/llvm/llvm-project/pull/102980

>From 098147142661a6b3ce058f92a2a0a958cdcef15c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mos=C3=A8=20Giordano?= <mose at gnu.org>
Date: Tue, 13 Aug 2024 00:26:25 +0200
Subject: [PATCH] [compiler-rt] Define `__STDC_FORMAT_MACROS` to ensure
 `PRId64` is available

---
 compiler-rt/lib/scudo/standalone/timing.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/compiler-rt/lib/scudo/standalone/timing.h b/compiler-rt/lib/scudo/standalone/timing.h
index de741edbff5fff..938b2053d03806 100644
--- a/compiler-rt/lib/scudo/standalone/timing.h
+++ b/compiler-rt/lib/scudo/standalone/timing.h
@@ -14,6 +14,10 @@
 #include "string_utils.h"
 #include "thread_annotations.h"
 
+#ifndef __STDC_FORMAT_MACROS
+// Ensure PRId64 macro is available
+#define __STDC_FORMAT_MACROS 1
+#endif
 #include <inttypes.h>
 #include <string.h>
 



More information about the llvm-commits mailing list