https://github.com/JuliaLang/julia
Raw File
Tip revision: 2ea083bc9fb5715ab16a5c251afacbd5e9072bfb authored by gbaraldi on 11 April 2024, 13:17:01 UTC
Update test
Tip revision: 2ea083b
libTracyClient-freebsd-elfw.patch
diff --git a/public/TracyClient.cpp b/public/TracyClient.cpp
index 77f81a4a..ebeb65c9 100644
--- a/public/TracyClient.cpp
+++ b/public/TracyClient.cpp
@@ -19,6 +19,28 @@
 #  pragma warning(push, 0)
 #endif

+#ifndef ElfW
+#  if defined(FREEBSD)
+#    if __ELF_WORD_SIZE == 32
+#      define ElfW(type) Elf32_##type
+#    else
+#      define ElfW(type) Elf64_##type
+#    endif
+#  elif defined(NETBSD) || defined(OPENBSD)
+#    if ELFSIZE == 32
+#      define ElfW(type) Elf32_##type
+#    else
+#      define ElfW(type) Elf64_##type
+#    endif
+#  else
+#    if !defined(ELF_CLASS) || ELF_CLASS == ELFCLASS32
+#      define ElfW(type) Elf32_##type
+#    else
+#      define ElfW(type) Elf64_##type
+#    endif
+#  endif
+#endif
+
 #include "common/tracy_lz4.cpp"
 #include "client/TracyProfiler.cpp"
 #include "client/TracyCallstack.cpp"
back to top