--- osdep/subprocess-posix.c 2023-07-24 01:10:36.000000000 +0800 +++ osdep/subprocess-posix.c 2024-11-13 04:32:01.000000000 +0800 @@ -31,7 +31,12 @@ #include "osdep/io.h" #include "stream/stream.h" +#ifdef __APPLE__ +#include +#define environ (*_NSGetEnviron()) +#else extern char **environ; +#endif #ifdef SIGRTMAX #define SIGNAL_MAX SIGRTMAX --- player/lua.c 2023-07-24 01:10:36.000000000 +0800 +++ player/lua.c 2024-11-13 04:44:10.000000000 +0800 @@ -52,6 +52,13 @@ #include "client.h" #include "libmpv/client.h" +#ifdef __APPLE__ +#include +#define environ (*_NSGetEnviron()) +#else +extern char **environ; +#endif + // List of builtin modules and their contents as strings. // All these are generated from player/lua/*.lua static const char * const builtin_lua_scripts[][2] = {