aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/lua/fix-ios-system.patch
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/lua/fix-ios-system.patch
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/lua/fix-ios-system.patch')
-rw-r--r--vcpkg/ports/lua/fix-ios-system.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/vcpkg/ports/lua/fix-ios-system.patch b/vcpkg/ports/lua/fix-ios-system.patch
new file mode 100644
index 0000000..f51c944
--- /dev/null
+++ b/vcpkg/ports/lua/fix-ios-system.patch
@@ -0,0 +1,29 @@
+diff --git a/src/loslib.c b/src/loslib.c
+index ad5a927..7812011 100644
+--- a/src/loslib.c
++++ b/src/loslib.c
+@@ -4,6 +4,10 @@
+ ** See Copyright Notice in lua.h
+ */
+
++#if defined(__APPLE__)
++#include <TargetConditionals.h>
++#endif
++
+ #define loslib_c
+ #define LUA_LIB
+
+@@ -143,7 +147,12 @@ static int os_execute (lua_State *L) {
+ const char *cmd = luaL_optstring(L, 1, NULL);
+ int stat;
+ errno = 0;
+- stat = l_system(cmd);
++#if defined(__APPLE__) && !TARGET_OS_OSX
++ // system() is __IOS_PROHIBITED, __WATCHOS_PROHIBITED, and __TVOS_PROHIBITED.
++ stat = 127; // error: shell execution failed
++#else
++ stat = system(cmd);
++#endif
+ if (cmd != NULL)
+ return luaL_execresult(L, stat);
+ else {