]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/lua/fix-ios-system.patch
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / lua / fix-ios-system.patch
diff --git a/ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/lua/fix-ios-system.patch b/ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/lua/fix-ios-system.patch
new file mode 100644 (file)
index 0000000..3e98ce2
--- /dev/null
@@ -0,0 +1,29 @@
+diff --git a/src/loslib.c b/src/loslib.c
+index e65e188..3595601 100644
+--- a/src/loslib.c
++++ b/src/loslib.c
+@@ -3,7 +3,9 @@
+ ** Standard Operating System library
+ ** See Copyright Notice in lua.h
+ */
+-
++#if defined(__APPLE__)
++#include <TargetConditionals.h>
++#endif
+ #define loslib_c
+ #define LUA_LIB
+@@ -143,7 +145,12 @@ static int os_execute (lua_State *L) {
+   const char *cmd = luaL_optstring(L, 1, NULL);
+   int stat;
+   errno = 0;
+-  stat = 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 {