]> git.proxmox.com Git - ceph.git/blob - 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
1 diff --git a/src/loslib.c b/src/loslib.c
2 index e65e188..3595601 100644
3 --- a/src/loslib.c
4 +++ b/src/loslib.c
5 @@ -3,7 +3,9 @@
6 ** Standard Operating System library
7 ** See Copyright Notice in lua.h
8 */
9 -
10 +#if defined(__APPLE__)
11 +#include <TargetConditionals.h>
12 +#endif
13 #define loslib_c
14 #define LUA_LIB
15
16 @@ -143,7 +145,12 @@ static int os_execute (lua_State *L) {
17 const char *cmd = luaL_optstring(L, 1, NULL);
18 int stat;
19 errno = 0;
20 - stat = system(cmd);
21 +#if defined(__APPLE__) && !TARGET_OS_OSX
22 + // system() is __IOS_PROHIBITED, __WATCHOS_PROHIBITED, and __TVOS_PROHIBITED.
23 + stat = 127; // error: shell execution failed
24 +#else
25 + stat = system(cmd);
26 +#endif
27 if (cmd != NULL)
28 return luaL_execresult(L, stat);
29 else {