summaryrefslogtreecommitdiffstats
path: root/UnknownVersion/src/loslib.c
diff options
context:
space:
mode:
Diffstat (limited to 'UnknownVersion/src/loslib.c')
-rw-r--r--UnknownVersion/src/loslib.c6
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)));