From patchwork Sun May 27 15:02:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 161550 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BF45DB6F9A for ; Mon, 28 May 2012 01:02:40 +1000 (EST) Received: from localhost ([::1]:60837 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYezO-0000iC-Lh for incoming@patchwork.ozlabs.org; Sun, 27 May 2012 11:02:38 -0400 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 Received: from af.local ([62.157.78.131]) by smtp.web.de (mrweb002) with ESMTPA (Nemesis) id 0MF3Rz-1SnqSM1bVj-00GGMU; Sun, 27 May 2012 17:02:22 +0200 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Sun, 27 May 2012 17:02:20 +0200 Message-Id: <1338130940-43034-1-git-send-email-andreas.faerber@web.de> X-Mailer: git-send-email 1.7.5.3 MIME-Version: 1.0 X-Provags-ID: V02:K0:Px9p7O4lIaTRNBhZADo1ttjTOYrdLV+IOHsn6XN8y4U 9FjTJUBs9+8N0mx/WWEGeAXhPJsFetJa9z+p4DZP5SgZcESl0B odPba+Adn0/uEFIBRJPO8LJFj8k4iovVDhXymnBOZQC3GljFea eXicLTlGOf2GxDBcro7W+cKIPLszpcRy9km4kzsO6UmK3JyViv 2V57V7gY8go7irDp6n+Hw== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.227.15.4 Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , Charlie Somerville , Michael Roth Subject: [Qemu-devel] [PATCH for-1.1] qemu-ga: Fix use of environ on Darwin X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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