Browse Source

Fixed for iOS/Android.

woollybah 5 years ago
parent
commit
1a07b773f7
1 changed files with 12 additions and 0 deletions
  1. 12 0
      lua.mod/lua-5.1.4/src/luaconf.h

+ 12 - 0
lua.mod/lua-5.1.4/src/luaconf.h

@@ -21,6 +21,18 @@
 #define LUA_USE_MACOSX
 #define LUA_USE_MACOSX
 #endif
 #endif
 
 
+/*
+** system() not available on mobile
+*/
+#if defined(__APPLE__)
+     #include "TargetConditionals.h"
+     #if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_TV
+         #define system(s) ((s)==NULL ? 0 : -1)
+     #endif // end iOS
+#elif defined(__ANDROID__)
+     #define system(s) ((s)==NULL ? 0 : -1)
+#endif
+
 /*
 /*
 ** ==================================================================
 ** ==================================================================
 ** Search for "@@" to find all configurable definitions.
 ** Search for "@@" to find all configurable definitions.