[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
- [PATCH] util: fix to get configuration macros in util/mmap-alloc.c, Jingqi Liu, 2020/03/05
- Re: [PATCH] util: fix to get configuration macros in util/mmap-alloc.c, Ján Tomko, 2020/03/05
- Re: [PATCH] util: fix to get configuration macros in util/mmap-alloc.c, Peter Maydell, 2020/03/05
- Re: [PATCH] util: fix to get configuration macros in util/mmap-alloc.c, Liu, Jingqi, 2020/03/05
- Re: [PATCH] util: fix to get configuration macros in util/mmap-alloc.c, Liu, Jingqi, 2020/03/09
- Re: [PATCH] util: fix to get configuration macros in util/mmap-alloc.c, Peter Maydell, 2020/03/09
- Re: [PATCH] util: fix to get configuration macros in util/mmap-alloc.c, Liu, Jingqi, 2020/03/10
- Re: [PATCH] util: fix to get configuration macros in util/mmap-alloc.c, Michael S. Tsirkin, 2020/03/10
- Re: [PATCH] util: fix to get configuration macros in util/mmap-alloc.c, Liu, Jingqi, 2020/03/10
- Re: [PATCH] util: fix to get configuration macros in util/mmap-alloc.c, Peter Maydell, 2020/03/11
- Re: [PATCH] util: fix to get configuration macros in util/mmap-alloc.c,
Eduardo Habkost <=
Re: [PATCH] util: fix to get configuration macros in util/mmap-alloc.c, Liu, Jingqi, 2020/03/05