mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-07-22 19:24:27 +00:00
compositor: check for execinfo.h
Some systems may not have execinfo.h. Add a configure test for it, and if it is not found, make the backtrace() call a no-operation. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
parent
51aaf646db
commit
200019c0c6
|
@ -24,6 +24,8 @@ AC_CHECK_FUNC([dlopen], [],
|
|||
AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl"))
|
||||
AC_SUBST(DLOPEN_LIBS)
|
||||
|
||||
AC_CHECK_HEADERS([execinfo.h])
|
||||
|
||||
PKG_CHECK_MODULES(COMPOSITOR,
|
||||
[wayland-server egl >= 7.10 glesv2 xkbcommon pixman-1])
|
||||
|
||||
|
|
|
@ -23,6 +23,16 @@
|
|||
#ifndef OS_COMPATIBILITY_H
|
||||
#define OS_COMPATIBILITY_H
|
||||
|
||||
#ifdef HAVE_EXECINFO_H
|
||||
#include <execinfo.h>
|
||||
#else
|
||||
static inline int
|
||||
backtrace(void **buffer, int size)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
os_socketpair_cloexec(int domain, int type, int protocol, int *sv);
|
||||
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
#include <dlfcn.h>
|
||||
#include <signal.h>
|
||||
#include <setjmp.h>
|
||||
#include <execinfo.h>
|
||||
|
||||
#include <wayland-server.h>
|
||||
#include "compositor.h"
|
||||
|
|
Loading…
Reference in a new issue