qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] util: fix to get configuration macros in util/mmap-alloc.c


From: Eduardo Habkost
Subject: Re: [PATCH] util: fix to get configuration macros in util/mmap-alloc.c
Date: Wed, 11 Mar 2020 16:42:46 -0400

On Wed, Mar 11, 2020 at 12:37:17PM +0000, Peter Maydell wrote:
> On Wed, 11 Mar 2020 at 00:43, Liu, Jingqi <address@hidden> wrote:
> > 1) If '#include <linux/mman.h>' first then '#include qemu/osdep.h', it
> > should be fine.
> >
> > 2) Peter mentioned osdep.h should go first.
> >
> > It will  cause redefinitions of other MAP_* macros after '#include
> > <linux/mman.h>'.
> >
> > This is where the conflict lies.
> 
> osdep.h first, always. Other uses of linux-headers headers
> have presumably already dealt with this issue...

Including linux/mman.h before sys/mman.h is just a workaround to
the root cause: both headers really redefine each others' macros,
but gcc hide the warnings if the warnings are generated inside
system-provided headers.

I believe we should use -isystem for linux-headers insteaad of -I.

-- 
Eduardo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]