From 920dc148731b928de99061f531a1cd1eb1c68393 Mon Sep 17 00:00:00 2001 From: Ryan Carsten Schmidt Date: Sun, 21 Apr 2024 16:55:31 -0500 Subject: [PATCH] Check for existence of TARGET_OS_IPHONE first Fixes build error on old SDKs that don't define TARGET_OS_IPHONE when using new compilers that consider it an error to check undefined TARGET_OS_ macros. ./lj_arch.h:127:5: error: 'TARGET_OS_IPHONE' is not defined, evaluates to 0 [-Werror,-Wundef-prefix=TARGET_OS_] --- src/lj_arch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lj_arch.h b/src/lj_arch.h index 026e741f..e6264398 100644 --- a/src/lj_arch.h +++ b/src/lj_arch.h @@ -124,7 +124,7 @@ #define LJ_TARGET_POSIX (LUAJIT_OS > LUAJIT_OS_WINDOWS) #define LJ_TARGET_DLOPEN LJ_TARGET_POSIX -#if TARGET_OS_IPHONE +#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE #define LJ_TARGET_IOS 1 #else #define LJ_TARGET_IOS 0