From eecae14724b64d43f9a44b9b4e69143961c201a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 27 May 2012 17:02:20 +0200 Subject: qemu-ga: Fix use of environ on Darwin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use _NSGetEnviron() helper to access the environment. Signed-off-by: Andreas Färber Cc: Charlie Somerville Signed-off-by: Michael Roth --- qga/commands-posix.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index dab3bf9..4a71c27 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 -- cgit v1.1