From: Andreas Färber Date: Sun, 27 May 2012 15:02:20 +0000 (+0200) Subject: qemu-ga: Fix use of environ on Darwin X-Git-Tag: v1.1.0-rc4~2^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eecae14724b64d43f9a44b9b4e69143961c201a3;p=thirdparty%2Fqemu.git qemu-ga: Fix use of environ on Darwin Use _NSGetEnviron() helper to access the environment. Signed-off-by: Andreas Färber Cc: Charlie Somerville Signed-off-by: Michael Roth --- diff --git a/qga/commands-posix.c b/qga/commands-posix.c index dab3bf9c987..4a71c27c4a2 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -22,8 +22,13 @@ #include "host-utils.h" #ifndef CONFIG_HAS_ENVIRON +#ifdef __APPLE__ +#include +#define environ (*_NSGetEnviron()) +#else extern char **environ; #endif +#endif #if defined(__linux__) #include