--- src/util/debug_util.c.orig 2017-11-16 07:13:16.000000000 +0100 +++ src/util/debug_util.c 2017-11-18 21:39:20.788717791 +0100 @@ -26,7 +26,10 @@ */ /** \cond */ +#include +#ifdef __GLIBC__ #include +#endif #include #include #include @@ -89,16 +92,22 @@ if (debug) printf("(%s) Starting. stack_adjust = %d\n", __func__, stack_adjust); - int j, nptrs; + int j, nptrs = 0; +#ifdef __GLIBC__ const int MAX_ADDRS = 100; void *buffer[MAX_ADDRS]; - char **strings; +#endif + char **strings = NULL; +#ifdef __GLIBC__ nptrs = backtrace(buffer, MAX_ADDRS); +#endif if (debug) printf("(%s) backtrace() returned %d addresses\n", __func__, nptrs); +#ifdef __GLIBC__ strings = backtrace_symbols(buffer, nptrs); +#endif if (strings == NULL) { perror("backtrace_symbols unavailable"); } --- src/util/edid.h.orig 2017-11-16 07:13:16.000000000 +0100 +++ src/util/edid.h 2017-11-17 21:29:05.725854175 +0100 @@ -36,6 +36,7 @@ #include #include #include +#include /** \endcond */ #include "coredefs.h"