From bba1cabae8fc8640adddfdab9670359e787e785b Mon Sep 17 00:00:00 2001 From: Andrew Eiche <1386498+buddingmonkey@users.noreply.github.com> Date: Thu, 6 Aug 2026 08:49:54 -0500 Subject: [PATCH] Stop ultralib's __assert declaration colliding with Darwin's macro Apple's defines __assert as a three-argument function-like macro, so ultralib's own declaration of it expanded mid-declaration and the parse collapsed. The declaration sits in the !NDEBUG branch, so Release builds never reached it and only Debug broke -- which is what Xcode's default scheme builds. This is not iOS-specific: a macOS Debug build fails the same way today. Declare it only where the platform has not already provided it. The macro's argument order matches the calls in the file, so on Apple platforms assert() now routes through __assert_rtn. --- lib/ultralib/include/ultra_assert.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ultralib/include/ultra_assert.h b/lib/ultralib/include/ultra_assert.h index 545c15219..dc5cace90 100644 --- a/lib/ultralib/include/ultra_assert.h +++ b/lib/ultralib/include/ultra_assert.h @@ -41,7 +41,9 @@ extern "C" { #else +#ifndef __assert extern void __assert(const char *, const char *, int); +#endif #ifdef __ANSI_CPP__ #define assert(EX) ((EX)?((void)0):__assert( # EX , __FILE__, __LINE__)) #else