mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-25 23:30:05 +01:00
Guard use of backtrace() with HAVE_BACKTRACE
Guard the use of backtrace() with HAVE_BACKTRACE, since we already
have the autoconf machinery for setting that.
For the moment, assume dladdr() is available when backtrace() is
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 38d55f06cf)
This commit is contained in:
parent
f0ee98584c
commit
79ef102c3a
1 changed files with 6 additions and 0 deletions
|
|
@ -31,7 +31,10 @@
|
|||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BACKTRACE
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
|
@ -46,6 +49,8 @@
|
|||
static void
|
||||
__glapi_gentable_NoOp(void) {
|
||||
const char *fstr = "Unknown";
|
||||
|
||||
#ifdef HAVE_BACKTRACE
|
||||
void *frames[2];
|
||||
|
||||
if(backtrace(frames, 2) == 2) {
|
||||
|
|
@ -54,6 +59,7 @@ __glapi_gentable_NoOp(void) {
|
|||
if(info.dli_sname)
|
||||
fstr = info.dli_sname;
|
||||
}
|
||||
#endif
|
||||
|
||||
LogMessage(X_ERROR, "GLX: Call to unimplemented API: %s\n", fstr);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue