Received: from eggs.gnu.org ([208.118.235.92]:39706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYezH-0000i0-Su for qemu-devel@nongnu.org; Sun, 27 May 2012 11:02:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SYezG-00036y-20 for qemu-devel@nongnu.org; Sun, 27 May 2012 11:02:31 -0400 Received: from mout.web.de ([212.227.15.4]:58576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYezF-00036s-Ox for qemu-devel@nongnu.org; Sun, 27 May 2012 11:02:29 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 27 May 2012 17:02:20 +0200 Message-Id: <1338130940-43034-1-git-send-email-andreas.faerber@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH for-1.1] qemu-ga: Fix use of environ on Darwin List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , Charlie Somerville , Michael Roth Use _NSGetEnviron() helper to access the environment. Signed-off-by: Andreas Färber Cc: Charlie Somerville --- Michael, can you please append this to your qemu-ga PULL? qga/commands-posix.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) 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 -- 1.7.5.3