From 24fa020c5e988625923ce329aa823c84d3487bc3 Mon Sep 17 00:00:00 2001 From: Vyacheslav Egorov Date: Mon, 19 Oct 2015 20:37:26 +0200 Subject: [PATCH] Disable os.execute() when building for iOS >= 8.0. --- src/lib_os.c | 2 +- src/lj_arch.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib_os.c b/src/lib_os.c index 7b5873a5..37d7d5be 100644 --- a/src/lib_os.c +++ b/src/lib_os.c @@ -39,7 +39,7 @@ LJLIB_CF(os_execute) { -#if LJ_TARGET_CONSOLE +#if LJ_NO_SYSTEM #if LJ_52 errno = ENOSYS; return luaL_fileresult(L, 0, NULL); diff --git a/src/lj_arch.h b/src/lj_arch.h index b72dbcca..cee16e77 100644 --- a/src/lj_arch.h +++ b/src/lj_arch.h @@ -498,6 +498,10 @@ #if defined(__symbian__) || LJ_TARGET_WINDOWS #define LUAJIT_NO_EXP2 #endif +#if LJ_TARGET_CONSOLE || (LJ_TARGET_IOS && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_8_0) +/* system() is deprecated starting from iOS 8.0 */ +#define LJ_NO_SYSTEM 1 +#endif #if defined(LUAJIT_NO_UNWIND) || defined(__symbian__) || LJ_TARGET_IOS || LJ_TARGET_PS3 || LJ_TARGET_PS4 #define LJ_NO_UNWIND 1