Permalink
Browse files

Fix iOS 11 compilation issue in lua53-luaplus/src/loslib.c

  • Loading branch information...
jjensen committed Oct 6, 2017
1 parent b7fe6ed commit 0106a2011c2c63cf210008e0310e869e5a043691
Showing with 8 additions and 0 deletions.
  1. +8 −0 Src/LuaPlus/lua53-luaplus/src/loslib.c
@@ -21,6 +21,9 @@
#include "lauxlib.h"
#include "lualib.h"
#if defined(__APPLE__)
#include <TargetConditionals.h>
#endif
/*
** {==================================================================
@@ -139,6 +142,10 @@ static time_t l_checktime (lua_State *L, int arg) {
static int os_execute (lua_State *L) {
#if defined(__APPLE__) && defined(TARGET_OS_IPHONE)
lua_pushboolean(L, 0);
return 1;
#else
const char *cmd = luaL_optstring(L, 1, NULL);
int stat = system(cmd);
if (cmd != NULL)
@@ -147,6 +154,7 @@ static int os_execute (lua_State *L) {
lua_pushboolean(L, stat); /* true if there is a shell */
return 1;
}
#endif
}

0 comments on commit 0106a20

Please sign in to comment.