From patchwork Wed May 23 15:57:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 160957 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 08D12B6FB6 for ; Thu, 24 May 2012 01:57:30 +1000 (EST) Received: from localhost ([::1]:34040 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXDwG-0002bd-06 for incoming@patchwork.ozlabs.org; Wed, 23 May 2012 11:57:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXDvx-0002an-9T for qemu-devel@nongnu.org; Wed, 23 May 2012 11:57:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXDvs-0004mr-A1 for qemu-devel@nongnu.org; Wed, 23 May 2012 11:57:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27958) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXDvs-0004lr-0v for qemu-devel@nongnu.org; Wed, 23 May 2012 11:57:04 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q4NFuun7009111 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 23 May 2012 11:56:56 -0400 Received: from doriath.home (ovpn-116-71.ams2.redhat.com [10.36.116.71]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q4NFuotS022588; Wed, 23 May 2012 11:56:51 -0400 Date: Wed, 23 May 2012 12:57:11 -0300 From: Luiz Capitulino To: Luiz Capitulino Message-ID: <20120523125711.783be240@doriath.home> In-Reply-To: <20120523113549.346baf42@doriath.home> References: <20120522230955.5F24540404@buildbot.b1-systems.de> <4FBC242A.4080107@suse.de> <20120523103954.27b13af7@doriath.home> <20120523113549.346baf42@doriath.home> Organization: Red Hat Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: agraf@suse.de, qemu-devel@nongnu.org, dunrong huang , Michael Roth , qemu@buildbot.b1-systems.de, gollub@b1-systems.de, Eric Blake , Andreas =?ISO-8859-1?B?RuRyYmVy?= Subject: Re: [Qemu-devel] buildbot failure in qemu on default_openbsd_current 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 On Wed, 23 May 2012 11:35:49 -0300 Luiz Capitulino wrote: > > Maybe we need a patch to declare environ for openbsd > > Yes, I have the patch already but am installing openbsd on a VM to test it. I'm getting lots of make errors on openbsd 4.9: "Makefile", line 7: Missing dependency operator "/root/qemu.a/rules.mak", line 20: Missing dependency operator "/root/qemu.a/rules.mak", line 23: Need an operator "/root/qemu.a/rules.mak", line 26: Need an operator "Makefile", line 15: Need an operator "Makefile", line 19: Need an operator "Makefile", line 22: Missing dependency operator "Makefile", line 24: Need an operator Bad modifier: $(SRC_PATH)/hw) Bad modifier: $(SRC_PATH)/hw) "Makefile", line 36: Need an operator Anyone knows what I did wrong? Or, if anybody could test the attached fix... From 4a3f4cff8aa27fe3810d621d20bf90f18ca8e2d5 Mon Sep 17 00:00:00 2001 From: Luiz Capitulino Date: Wed, 23 May 2012 11:33:51 -0300 Subject: [PATCH] qemu-ga: Fix missing environ declarion Commit 3674838cd05268954bb6473239cd7f700a79bf0f uses the environ global variable, but is relying on it to be declared somewhere else. This works for Linux because _GNU_SOURCE declares it, but it brakes for system where _GNU_SOURCE is not declared, such as OpenBSD. Fix it by declaring environ when _GNU_SOURCE is not defined. Signed-off-by: Luiz Capitulino --- qga/commands-posix.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 7664be1..304ffa8 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include "qga/guest-agent-core.h" @@ -20,6 +21,10 @@ #include "qemu-queue.h" #include "host-utils.h" +#ifndef _GNU_SOURCE +extern char **environ; +#endif + #if defined(__linux__) #include #include -- 1.7.9.2.384.g4a92a