From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPCzi-0004br-IX for qemu-devel@nongnu.org; Sun, 16 Mar 2014 11:28:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPCzh-0000eq-Mm for qemu-devel@nongnu.org; Sun, 16 Mar 2014 11:28:58 -0400 Received: from speedy.comstyle.com ([2001:470:1d:8c::2]:20552 helo=mail.comstyle.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPCzh-0000em-Ib for qemu-devel@nongnu.org; Sun, 16 Mar 2014 11:28:57 -0400 Message-ID: <5325C334.5030006@comstyle.com> Date: Sun, 16 Mar 2014 11:28:52 -0400 From: Brad Smith MIME-Version: 1.0 References: <5325A5B0.1080102@comstyle.com> <5325B653.6020105@comstyle.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] QEMU build broken List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , Marcel Apfelbaum On 16/03/14 11:03 AM, Peter Maydell wrote: > On 16 March 2014 14:33, Brad Smith wrote: >> On 16/03/14 9:26 AM, Peter Maydell wrote: >>> Can we limit the set of system headers we're pulling in to >>> avoid the header where OpenBSD is defining this? Generally >>> for specific headers that clash it's nicer to just limit those to >>> whatever file really needed those defines. I'm assuming it's >>> not pulled in by one of the POSIX headers... > >> It looks like it is being pulled in via include/qemu/sockets.h >> which includes netdb.h. > > Ouch, and netdb.h results in this macro getting defined? > That seems like a bit of a namespace grab by OpenBSD's > libc really :-( > > -- PMM netdb.h pulls in sys/param.h which pulls in machine/param.h which is a MD header and that would define something like.. #define _MACHINE amd64 #define MACHINE "amd64" #define _MACHINE_ARCH amd64 #define MACHINE_ARCH "amd64" There has been some relatively recent work towards improving POSIX/SUS compliance and reducing namespace pollution with some of the headers but it seems this has not been eliminated yet. But most of the namespace pollution reduction has come from theoretical issues that could come from namespace collisions. I'm not sure if anything with this constant has come up before. But I have mentioned this issue to the developer whom is working on fixing / cleaning up the headers to see what he says. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.