On 16/03/14 11:03 AM, Peter Maydell wrote:
On 16 March 2014 14:33, Brad Smith <b...@comstyle.com> 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.