mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-15 09:10:37 +01:00
os/osinit: fix build when execinfo.h is missing
HAVE_BACKTRACE gets set on systems with libunwind however
execinfo.h may be missing (on *BSD or musl for example).
HAVE_EXECINFO_H has been defined by the build system for a long
time but previously not used.
Signed-off-by: Randy Palamar <randy@rnpnr.xyz>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1207>
(cherry picked from commit 5677de586f)
This commit is contained in:
parent
1845111f59
commit
574e0a005f
1 changed files with 2 additions and 2 deletions
|
|
@ -59,7 +59,7 @@ SOFTWARE.
|
|||
#ifdef HAVE_DLFCN_H
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
#ifdef HAVE_BACKTRACE
|
||||
#if defined(HAVE_BACKTRACE) && defined(HAVE_EXECINFO_H)
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -206,7 +206,7 @@ OsInit(void)
|
|||
if (!server_poll)
|
||||
FatalError("failed to allocate poll structure");
|
||||
|
||||
#ifdef HAVE_BACKTRACE
|
||||
#if defined(HAVE_BACKTRACE) && defined(HAVE_EXECINFO_H)
|
||||
/*
|
||||
* initialize the backtracer, since the ctor calls dlopen(), which
|
||||
* calls malloc(), which isn't signal-safe.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue