From 834dd780bf1fe0704b8ed0350ca355a55f711a9f Mon Sep 17 00:00:00 2001 From: Amol Bhave Date: Wed, 3 Apr 2019 11:57:27 -0700 Subject: [PATCH] Fix symbolize_unittest for musl builds When glog 0.4.0 is built using musl instead of glibc, the compilation for this test fails because musl doesn't provide execinfo.h, which sets HAVE_STACKTRACE to false. Tested by building glog with musl and verifying that the build succeeds with this patch. [See https://github.com/openwrt/packages/pull/8583] Signed-off-by: Amol Bhave --- src/symbolize_unittest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/symbolize_unittest.cc b/src/symbolize_unittest.cc index 9a17e7b2a..35cc2d31f 100644 --- a/src/symbolize_unittest.cc +++ b/src/symbolize_unittest.cc @@ -401,7 +401,7 @@ int main(int argc, char **argv) { FLAGS_logtostderr = true; InitGoogleLogging(argv[0]); InitGoogleTest(&argc, argv); -#if defined(HAVE_SYMBOLIZE) +#if defined(HAVE_SYMBOLIZE) && defined(HAVE_STACKTRACE) # if defined(__ELF__) // We don't want to get affected by the callback interface, that may be // used to install some callback function at InitGoogle() time.