diff --git a/include/cpptrace/cpptrace.hpp b/include/cpptrace/cpptrace.hpp index 04aa6c9..a879954 100644 --- a/include/cpptrace/cpptrace.hpp +++ b/include/cpptrace/cpptrace.hpp @@ -371,7 +371,8 @@ namespace cpptrace { std::exception_ptr nested_ptr() const noexcept; }; - CPPTRACE_EXPORT [[noreturn]] void rethrow_and_wrap_if_needed(std::size_t skip = 0); + // [[noreturn]] must come first due to old clang + [[noreturn]] CPPTRACE_EXPORT void rethrow_and_wrap_if_needed(std::size_t skip = 0); } #if defined(CPPTRACE_STD_FORMAT) && defined(__cpp_lib_format) diff --git a/src/binary/object.hpp b/src/binary/object.hpp index 8cd899a..1af4f21 100644 --- a/src/binary/object.hpp +++ b/src/binary/object.hpp @@ -17,7 +17,7 @@ #else #include "elf.hpp" #endif - #if CPPTRACE_HAS_DL_FIND_OBJECT + #ifdef CPPTRACE_HAS_DL_FIND_OBJECT #include #endif #elif IS_WINDOWS @@ -64,7 +64,7 @@ namespace detail { } } #endif - #if CPPTRACE_HAS_DL_FIND_OBJECT + #ifdef CPPTRACE_HAS_DL_FIND_OBJECT inline std::vector get_frames_object_info(const std::vector& addrs) { // Use _dl_find_object when we can, it's orders of magnitude faster std::vector frames; diff --git a/src/binary/safe_dl.hpp b/src/binary/safe_dl.hpp index 9376293..5132808 100644 --- a/src/binary/safe_dl.hpp +++ b/src/binary/safe_dl.hpp @@ -12,7 +12,7 @@ #include #include -#if CPPTRACE_HAS_DL_FIND_OBJECT +#ifdef CPPTRACE_HAS_DL_FIND_OBJECT #if IS_LINUX || IS_APPLE #include #include