Fixes building with debug enabled on musl systems.
---
 configure.ac                                | 1 +
 src/gallium/auxiliary/util/u_debug_symbol.c | 4 ++--
 src/mapi/glapi/gen/gl_gentable.py           | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 49be147..1369937 100644
--- a/configure.ac
+++ b/configure.ac
@@ -758,6 +758,7 @@ AC_CHECK_HEADER([xlocale.h], [DEFINES="$DEFINES 
-DHAVE_XLOCALE_H"])
 AC_CHECK_HEADER([sys/sysctl.h], [DEFINES="$DEFINES -DHAVE_SYS_SYSCTL_H"])
 AC_CHECK_FUNC([strtof], [DEFINES="$DEFINES -DHAVE_STRTOF"])
 AC_CHECK_FUNC([mkostemp], [DEFINES="$DEFINES -DHAVE_MKOSTEMP"])
+AC_CHECK_HEADER([execinfo.h], [DEFINES="$DEFINES -DHAVE_EXECINFO_H"])
 
 dnl Check to see if dlopen is in default libraries (like Solaris, which
 dnl has it in libc), or if libdl is needed to get it.
diff --git a/src/gallium/auxiliary/util/u_debug_symbol.c 
b/src/gallium/auxiliary/util/u_debug_symbol.c
index 10efdd5..4026089 100644
--- a/src/gallium/auxiliary/util/u_debug_symbol.c
+++ b/src/gallium/auxiliary/util/u_debug_symbol.c
@@ -219,7 +219,7 @@ debug_symbol_name_dbghelp(const void *addr, char* buf, 
unsigned size)
 #endif /* PIPE_OS_WINDOWS */
 
 
-#if defined(__GLIBC__) && !defined(__UCLIBC__)
+#if defined(HAVE_EXECINFO_H)
 
 #include <execinfo.h>
 
@@ -240,7 +240,7 @@ debug_symbol_name_glibc(const void *addr, char* buf, 
unsigned size)
    return TRUE;
 }
 
-#endif /* defined(__GLIBC__) && !defined(__UCLIBC__) */
+#endif /* defined(HAVE_EXECINFO_H) */
 
 
 void
diff --git a/src/mapi/glapi/gen/gl_gentable.py 
b/src/mapi/glapi/gen/gl_gentable.py
index 7cd475a..0d1ebd4 100644
--- a/src/mapi/glapi/gen/gl_gentable.py
+++ b/src/mapi/glapi/gen/gl_gentable.py
@@ -44,7 +44,7 @@ header = """/* GLXEXT is the define used in the xserver when 
the GLX extension i
 #endif
 
 #if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \\
-       || (!defined(GLXEXT) && defined(DEBUG) && !defined(__CYGWIN__) && 
!defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && 
!defined(__DragonFly__))
+       || (!defined(GLXEXT) && defined(DEBUG) && defined(HAVE_EXECINFO_H))
 #define USE_BACKTRACE
 #endif
 
-- 
2.7.3

_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to