Skip to content

Commit f904cc1

Browse files
UdjinM6kwvg
authored andcommitted
fix: __clang__ && __APPLE__ for __assert_rtn
1 parent fe952c0 commit f904cc1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/stacktraces.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ extern "C" void __real___cxa_free_exception(void * thrown_exception)
557557
static auto f = (void(*)(void*))dlsym(RTLD_NEXT, "__cxa_free_exception");
558558
return f(thrown_exception);
559559
}
560-
#if defined(__clang__)
560+
#if defined(__clang__) && defined(__APPLE__)
561561
extern "C" void __attribute__((noreturn)) __real___assert_rtn(const char *function, const char *file, int line, const char *assertion)
562562
{
563563
static auto f = (void(__attribute__((noreturn)) *) (const char*, const char*, int, const char*))dlsym(RTLD_NEXT, "__assert_rtn");
@@ -622,7 +622,7 @@ static __attribute__((noinline)) crash_info GetCrashInfoFromAssertion(const char
622622
return ci;
623623
}
624624

625-
#if defined(__clang__)
625+
#if defined(__clang__) && defined(__APPLE__)
626626
extern "C" void __attribute__((noinline)) WRAPPED_NAME(__assert_rtn)(const char *function, const char *file, int line, const char *assertion)
627627
{
628628
auto ci = GetCrashInfoFromAssertion(assertion, file, line, function);

0 commit comments

Comments
 (0)