AK: Add support for backtraces on Haiku

This commit is contained in:
Niklas Poslovski 2023-09-18 20:34:14 +02:00 committed by Sam Atkins
parent 9ce2682ce6
commit 485ae28ba7
Notes: sideshowbarker 2024-07-19 16:50:06 +09:00
2 changed files with 3 additions and 3 deletions

View file

@ -10,7 +10,7 @@
#include <AK/StringBuilder.h>
#include <AK/StringView.h>
#if (defined(AK_OS_LINUX) && !defined(AK_OS_ANDROID)) || defined(AK_LIBC_GLIBC) || defined(AK_OS_BSD_GENERIC) || defined(AK_OS_SOLARIS)
#if (defined(AK_OS_LINUX) && !defined(AK_OS_ANDROID)) || defined(AK_LIBC_GLIBC) || defined(AK_OS_BSD_GENERIC) || defined(AK_OS_SOLARIS) || defined(AK_OS_HAIKU)
# define EXECINFO_BACKTRACE
#endif

View file

@ -340,8 +340,8 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
# Solaris has socket and networking related functions in two extra libraries
target_link_libraries(LibCore PRIVATE nsl socket)
endif()
if (${CMAKE_SYSTEM_NAME} MATCHES "BSD$")
# BSD Platforms have backtrace(3) in a separate library
if (${CMAKE_SYSTEM_NAME} MATCHES "BSD$" OR HAIKU)
# BSD Platforms and Haiku have backtrace(3) in a separate library
target_link_libraries(LibCore PRIVATE execinfo)
endif()
if (HAIKU)