mirror of
https://github.com/neovim/neovim.git
synced 2025-09-10 21:38:19 +00:00
fix(pty_proc/macOS): Properly set the environment for the child
Binding _NSGetEnviron()'s return value to a local variable and then re-binding that is incorrect. We need to directly update what _NSGetEnviron() refers to.
This commit is contained in:
@@ -159,7 +159,7 @@ static void init_child(PtyProcess *ptyproc)
|
|||||||
FUNC_ATTR_NONNULL_ALL
|
FUNC_ATTR_NONNULL_ALL
|
||||||
{
|
{
|
||||||
#if defined(HAVE__NSGETENVIRON)
|
#if defined(HAVE__NSGETENVIRON)
|
||||||
char **environ = *_NSGetEnviron();
|
#define environ (*_NSGetEnviron())
|
||||||
#else
|
#else
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user