Description: Fix FTBFS: do not #define __PRETTY_FUNCTION__ as NULL on GCC
 cl_assert.h unconditionally did `#define __PRETTY_FUNCTION__ NULL` when the
 preprocessor macro __PRETTY_FUNCTION__ is not defined. On GCC this pollutes
 later-included libstdc++ headers (which use the compiler builtin
 __PRETTY_FUNCTION__), so those expand it to the macro NULL, which is not
 declared yet (<cstddef> not included), causing errors like
 "'NULL' was not declared in this scope" since GCC 15. Guard the fallback so
 it is only used on non-GNU compilers (preserving the old MSVC behaviour).
Author: tangxiaofeng <tangxiaofeng@kylinos.cn>
Forwarded: not-needed
Last-Update: 2026-09-01

--- clanlib-1.0~svn3827.orig/Sources/API/Core/System/cl_assert.h
+++ clanlib-1.0~svn3827/Sources/API/Core/System/cl_assert.h
@@ -47,7 +47,7 @@
 #pragma once
 #endif
 
-#ifndef __PRETTY_FUNCTION__ 
+#if !defined(__GNUC__) && !defined(__PRETTY_FUNCTION__)
 #define __PRETTY_FUNCTION__ NULL
 #endif
