[master] 84786afdf Make unwind work under macos
Federico G. Schwindt
fgsch at lodoss.net
Thu Oct 31 07:14:08 UTC 2019
commit 84786afdf3d8afe08432907b87df86d77f8ee679
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Thu Oct 31 11:07:30 2019 +0900
Make unwind work under macos
diff --git a/bin/varnishd/cache/cache_panic.c b/bin/varnishd/cache/cache_panic.c
index 37ea6b8fd..26be29cf7 100644
--- a/bin/varnishd/cache/cache_panic.c
+++ b/bin/varnishd/cache/cache_panic.c
@@ -647,7 +647,7 @@ pan_backtrace(struct vsb *vsb)
unw_get_reg(&cursor, UNW_REG_SP, &sp);
unw_get_proc_name(&cursor, fname, sizeof(fname), &offp);
VSB_printf(vsb, "ip=0x%lx, sp=0x%lx <%s+0x%lx>\n", (long) ip,
- (long) sp, fname[0] ? fname : "<unknown>", offp);
+ (long) sp, fname[0] ? fname : "<unknown>", (long)offp);
}
VSB_indent(vsb, -2);
diff --git a/configure.ac b/configure.ac
index c5b5930cc..297e8223e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -349,7 +349,14 @@ AC_ARG_WITH([unwind],
[use libunwind to print stacktraces (use libexecinfo otherwise). Recommended on alpine linux. Defaults to no.])])
if test "$with_unwind" = yes; then
- PKG_CHECK_MODULES([LIBUNWIND], [libunwind])
+ case $target in
+ *-*-darwin*)
+ # Always present but .pc is not installed
+ ;;
+ *)
+ PKG_CHECK_MODULES([LIBUNWIND], [libunwind])
+ ;;
+ esac
AC_DEFINE([WITH_UNWIND], [1],
[Define to 1 to use libunwind instead of libexecinfo])
else
More information about the varnish-commit
mailing list