From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPuyo-0003wz-Nw for qemu-devel@nongnu.org; Tue, 18 Mar 2014 10:27:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPuyj-0001ld-Eo for qemu-devel@nongnu.org; Tue, 18 Mar 2014 10:26:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPuyj-0001lV-5e for qemu-devel@nongnu.org; Tue, 18 Mar 2014 10:26:53 -0400 Message-ID: <1395152830.2328.8.camel@localhost.localdomain> From: Marcel Apfelbaum Date: Tue, 18 Mar 2014 16:27:10 +0200 In-Reply-To: <1395151522.2328.6.camel@localhost.localdomain> References: <1395149962-31793-1-git-send-email-marcel.a@redhat.com> <1395151522.2328.6.camel@localhost.localdomain> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for-2.0] vl.c: Fix OpenBSD compilation issue due to namespace collisions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Brad Smith , QEMU Developers , Anthony Liguori , Andreas =?ISO-8859-1?Q?F=E4rber?= On Tue, 2014-03-18 at 16:05 +0200, Marcel Apfelbaum wrote: > On Tue, 2014-03-18 at 13:57 +0000, Peter Maydell wrote: > > On 18 March 2014 13:39, Marcel Apfelbaum wrote: > > > Machine rewriting added MACHINE macro which is > > > already in use by other OpenBSD library. > > > Since qemu/sockets.h exposes the OpenBSD namespace, > > > the minimalistic approach is to add it as the first QEMU include. > > > > > > Reported-by: Brad Smith > > > Signed-off-by: Marcel Apfelbaum > > > --- > > > vl.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/vl.c b/vl.c > > > index f0fe48b..9f86e68 100644 > > > --- a/vl.c > > > +++ b/vl.c > > > @@ -58,6 +58,7 @@ int main(int argc, char **argv) > > > > > > #include > > > > > > +#include "qemu/sockets.h" > > > #include "hw/hw.h" > > > #include "hw/boards.h" > > > #include "hw/usb.h" > > > @@ -103,7 +104,6 @@ int main(int argc, char **argv) > > > > > > #include "disas/disas.h" > > > > > > -#include "qemu/sockets.h" > > > > > > #include "slirp/libslirp.h" > > > > I'm confused; why doesn't this just result in a compiler > > error in the other direction when we try to #define > > MACHINE in QEMU and it's already been defined by > > the BSD headers? > Maybe because there is usage of the "MACHINE" define by the BSD > library? (on Qemu context, of course! - meaning, it shouldn't even be > exposed in the first place!) I meant "there is *no* usage of the..." > > Thanks, > Marcel > > > > > thanks > > -- PMM > >