From 99c45d35ad5f9f5d00f3230b167faa611503c279 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 3 Jul 2026 13:17:00 -0500 Subject: [PATCH] Fix compatibility with GCC versions that lack __has_builtin() --- src/Platform.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Platform.h b/src/Platform.h index 2292b38..f219864 100644 --- a/src/Platform.h +++ b/src/Platform.h @@ -132,7 +132,11 @@ #define LC_ASSERT_VT(x) LC_ASSERT(x) #endif -#if defined(__has_builtin) && __has_builtin(__builtin_bswap16) +#ifndef __has_builtin +#define __has_builtin(x) 0 +#endif + +#if __has_builtin(__builtin_bswap16) #define LC_HAS_BUILTIN_BSWAP #endif