From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50625) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPwZm-0002n2-58 for qemu-devel@nongnu.org; Tue, 18 Mar 2014 12:09:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPwZh-00052P-99 for qemu-devel@nongnu.org; Tue, 18 Mar 2014 12:09:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPwZg-00052F-W6 for qemu-devel@nongnu.org; Tue, 18 Mar 2014 12:09:09 -0400 Message-ID: <1395151522.2328.6.camel@localhost.localdomain> From: Marcel Apfelbaum Date: Tue, 18 Mar 2014 16:05:22 +0200 In-Reply-To: References: <1395149962-31793-1-git-send-email-marcel.a@redhat.com> 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 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!) Thanks, Marcel > > thanks > -- PMM