logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

srb2-2.2.13-execinfo_guard.patch (987B)


  1. From 2e8dba054533e4a0c7e685a934e7f220db69a331 Mon Sep 17 00:00:00 2001
  2. From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
  3. Date: Thu, 14 Dec 2023 17:52:55 +0100
  4. Subject: [PATCH] src/sdl/i_system.c: Guard backtrace(3) behind glibc and *BSD
  5. Present in NetBSD 7.0+, OpenBSD 7.0+, FreeBSD 10.0+, DragonFlyBSD, GNU glibc 2.1+
  6. Absent in POSIX and musl libc.
  7. ---
  8. src/sdl/i_system.c | 2 +-
  9. 1 file changed, 1 insertion(+), 1 deletion(-)
  10. diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c
  11. index 2a26f3f501..2158b60ee9 100644
  12. --- a/src/sdl/i_system.c
  13. +++ b/src/sdl/i_system.c
  14. @@ -137,7 +137,7 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T);
  15. #include <errno.h>
  16. #endif
  17. -#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON)
  18. +#if defined(__APPLE__) || defined (__GLIBC__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
  19. #include <execinfo.h>
  20. #include <time.h>
  21. #define UNIXBACKTRACE