diff --git a/public/client/TracyCallstack.h b/public/client/TracyCallstack.h index c469df7c..8e9a8de7 100644 --- a/public/client/TracyCallstack.h +++ b/public/client/TracyCallstack.h @@ -29,7 +29,7 @@ # elif defined BSD # define TRACY_HAS_CALLSTACK 6 # elif defined __HAIKU__ -# define TRACY_HAS_CALLSTACK 5 +# define TRACY_HAS_CALLSTACK 2 # endif #endif diff --git a/public/libbacktrace/config.h b/public/libbacktrace/config.h index 87e38a95..e22b3b02 100644 --- a/public/libbacktrace/config.h +++ b/public/libbacktrace/config.h @@ -3,6 +3,12 @@ // include __WORDSIZE headers for musl # include #endif + +#ifdef __HAIKU__ +# include +# define __WORDSIZE __HAIKU_ARCH_BITS +#endif + #if __WORDSIZE == 64 # define BACKTRACE_ELF_SIZE 64 #else diff --git a/public/libbacktrace/elf.cpp b/public/libbacktrace/elf.cpp index fb2ebbdd..405a1759 100644 --- a/public/libbacktrace/elf.cpp +++ b/public/libbacktrace/elf.cpp @@ -71,9 +71,8 @@ POSSIBILITY OF SUCH DAMAGE. */ #endif #endif -#if defined __HAIKU__ -#undef HAVE_DL_ITERATE_PHDR -#define ElfW(x) Elf_##x +#ifdef __HAIKU__ +# define ElfW(x) Elf_##x #endif namespace tracy diff --git a/test/Makefile b/test/Makefile index ee5c607b..9f714b93 100644 --- a/test/Makefile +++ b/test/Makefile @@ -5,7 +5,7 @@ DEFINES += INCLUDES := -I../public/tracy LIBS := -lpthread ifeq ($(shell uname -o),Haiku) -LIBS += -lroot -lnetwork +LIBS += -lroot -lnetwork -lbsd else LIBS += -ldl endif