[ovs-dev] [PATCH 2/2] backtrace: Fix 32-bit libunwind build.
William Tu
u9012063 at gmail.com
Fri Oct 4 21:21:16 UTC 2019
The libunwind unw_word_t type is defined as uint32_t for 32-bit
system and uint64_t for 64-bit system. The patch fixes the
compile error using PRIxPTR to print this value.
Fixes: e2ed6fbeb18c ("fatal-signal: Catch SIGSEGV and print backtrace.")
Signed-off-by: William Tu <u9012063 at gmail.com>
Acked-by: Ilya Maximets <i.maximets at ovn.org>
---
lib/backtrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/backtrace.c b/lib/backtrace.c
index 9347634487c8..2853d5ff150d 100644
--- a/lib/backtrace.c
+++ b/lib/backtrace.c
@@ -102,7 +102,7 @@ log_received_backtrace(int fd) {
if (backtrace[i].func[0] == 0) {
break;
}
- VLOG_WARN("0x%016lx <%s+0x%lx>\n",
+ VLOG_WARN("0x%016"PRIxPTR" <%s+0x%"PRIxPTR">\n",
backtrace[i].ip,
backtrace[i].func,
backtrace[i].offset);
--
2.7.4
More information about the dev
mailing list