Fix: error: use of undeclared identifier 'environ' https://dev.gnupg.org/T7169 --- src/spawn-posix.c.orig 2024-06-19 02:33:41.000000000 -0500 +++ src/spawn-posix.c 2024-06-21 01:54:38.000000000 -0500 @@ -57,6 +57,11 @@ #include "gpgrt-int.h" +#ifdef __APPLE__ +# include +#else +extern char **environ; +#endif /* Definition for the gpgrt_spawn_actions_t. Note that there is a * different one for Windows. */ @@ -342,7 +347,11 @@ _gpgrt_close_all_fds (3, act->except_fds); if (act->environ) +#ifdef __APPLE__ + *_NSGetEnviron() = act->environ; +#else environ = act->environ; +#endif if (act->atfork) act->atfork (act->atfork_arg);