[libunwind] [unwind] Make sure `__STDC_FORMAT_MACROS` is defined to ensure `PRId6… (PR #117491)

via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 24 06:44:30 PST 2024


https://github.com/Zentrik created https://github.com/llvm/llvm-project/pull/117491

…4` is available

See https://github.com/llvm/llvm-project/pull/102980 for further details.

>From 65a74d7dd7ef066430f2cf327d0a9ac5aa3adbe9 Mon Sep 17 00:00:00 2001
From: Zentrik <llvm.zentrik at gmail.com>
Date: Sun, 24 Nov 2024 14:44:17 +0000
Subject: [PATCH] [unwind] Make sure `__STDC_FORMAT_MACROS` is defined to
 ensure `PRId64` is available

See https://github.com/llvm/llvm-project/pull/102980 for further details.
---
 libunwind/src/DwarfParser.hpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libunwind/src/DwarfParser.hpp b/libunwind/src/DwarfParser.hpp
index 7e85025dd054d5..54357f56494330 100644
--- a/libunwind/src/DwarfParser.hpp
+++ b/libunwind/src/DwarfParser.hpp
@@ -12,6 +12,10 @@
 #ifndef __DWARF_PARSER_HPP__
 #define __DWARF_PARSER_HPP__
 
+#ifndef __STDC_FORMAT_MACROS
+// Ensure PRId64 macro is available
+#define __STDC_FORMAT_MACROS 1
+#endif
 #include <inttypes.h>
 #include <stdint.h>
 #include <stdio.h>



More information about the cfe-commits mailing list