A quick fix is to add this to luaconf.h: #define system(s) ((s)==NULL ? 0 : -1) If someone knows the correct defines that identify iOS then this should be something like: #if defined(__IOS__) #define system(s) ((s)==NULL ? 0 : -1) #endif