xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Feb 8 15:26:55 UTC 2025


 os/osinit.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5677de586fbe3ffff0c0a3bb53ea6ea915a5d70f
Author: Randy Palamar <randy at rnpnr.xyz>
Date:   Wed Nov 29 05:21:10 2023 -0700

    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 at rnpnr.xyz>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1207>

diff --git a/os/osinit.c b/os/osinit.c
index 71c943a38..3e18b51b0 100644
--- a/os/osinit.c
+++ b/os/osinit.c
@@ -54,7 +54,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
 
@@ -202,7 +202,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.


More information about the xorg-commit mailing list