[libunwind] [libunwind] Make sure `__STDC_FORMAT_MACROS` is defined to ensure `PRId64` is available (PR #117491)

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


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libunwind

Author: None (Zentrik)

<details>
<summary>Changes</summary>

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

---
Full diff: https://github.com/llvm/llvm-project/pull/117491.diff


1 Files Affected:

- (modified) libunwind/src/DwarfParser.hpp (+4) 


``````````diff
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>

``````````

</details>


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


More information about the cfe-commits mailing list