From 30ce5244a3430491d2bc000575e03d6b4b4ebe2c Mon Sep 17 00:00:00 2001 From: deal Date: Mon, 7 Mar 2022 19:00:52 +0800 Subject: [PATCH] Fix ios compile error --- thirdparty/lua/plainlua/loslib.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/thirdparty/lua/plainlua/loslib.c b/thirdparty/lua/plainlua/loslib.c index 3e20d622ba..76f294875f 100644 --- a/thirdparty/lua/plainlua/loslib.c +++ b/thirdparty/lua/plainlua/loslib.c @@ -138,8 +138,8 @@ /* }================================================================== */ - static int os_execute (lua_State *L) { +#if !defined(__APPLE__) const char *cmd = luaL_optstring(L, 1, NULL); int stat; errno = 0; @@ -150,6 +150,9 @@ static int os_execute (lua_State *L) { lua_pushboolean(L, stat); /* true if there is a shell */ return 1; } +#else + return 0; +#endif }