diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-10-10 17:41:57 +0200 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-10-10 15:51:47 +0000 |
commit | 50f3bfe90f713f7408d3db5e5948f069dd6f97ea (patch) | |
tree | d0d97611c0a4b8350581f274ba003b7761ba3de3 | |
parent | 940cf58b3109f41c2791a28e8a9db5b4af45919c (diff) |
Fix build on iOS
iOS does not have system()
Change-Id: Iabffe169f7952393589276c5dee18eafa7d6a9c2
Reviewed-by: Pasi Keränen <pasi.keranen@qt.io>
-rw-r--r-- | UnknownVersion/src/loslib.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/UnknownVersion/src/loslib.c b/UnknownVersion/src/loslib.c index c0b91ed..efb322f 100644 --- a/UnknownVersion/src/loslib.c +++ b/UnknownVersion/src/loslib.c @@ -25,6 +25,10 @@ #define getenv(e) NULL // AKPATCHEND +#ifdef __APPLE__ +#include <TargetConditionals.h> +#endif + static int os_pushresult (lua_State *L, int i, const char *filename) { int en = errno; /* calls to Lua API may change this value */ if (i) { @@ -41,7 +45,7 @@ static int os_pushresult (lua_State *L, int i, const char *filename) { static int os_execute (lua_State *L) { -#ifdef __INTEGRITY +#if defined __INTEGRITY || (defined(__APPLE__) && TARGET_OS_IPHONE) lua_pushinteger(L, 0); #else lua_pushinteger(L, system(luaL_optstring(L, 1, NULL))); |