Message ID | 20230117220914.2062125-3-peterx@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | migration: Support hugetlb doublemaps | expand |
* Peter Xu (peterx@redhat.com) wrote: > Without it, we never have CONFIG_LINUX defined even if on linux, so > linux/mman.h is never really included. > > Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> > --- > util/mmap-alloc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c > index 5ed7d29183..040599b0e3 100644 > --- a/util/mmap-alloc.c > +++ b/util/mmap-alloc.c > @@ -9,6 +9,7 @@ > * This work is licensed under the terms of the GNU GPL, version 2 or > * later. See the COPYING file in the top-level directory. > */ > +#include "qemu/osdep.h" > > #ifdef CONFIG_LINUX > #include <linux/mman.h> > @@ -17,7 +18,6 @@ > #define MAP_SHARED_VALIDATE 0x0 > #endif /* CONFIG_LINUX */ > > -#include "qemu/osdep.h" > #include "qemu/mmap-alloc.h" > #include "qemu/host-utils.h" > #include "qemu/cutils.h" > -- > 2.37.3 >
On 17/1/23 23:08, Peter Xu wrote: > Without it, we never have CONFIG_LINUX defined even if on linux, so > linux/mman.h is never really included. > > Signed-off-by: Peter Xu <peterx@redhat.com> > --- > util/mmap-alloc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Peter Xu <peterx@redhat.com> wrote: > Without it, we never have CONFIG_LINUX defined even if on linux, so > linux/mman.h is never really included. > > Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Markus is working on this right now, Markus?
diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c index 5ed7d29183..040599b0e3 100644 --- a/util/mmap-alloc.c +++ b/util/mmap-alloc.c @@ -9,6 +9,7 @@ * This work is licensed under the terms of the GNU GPL, version 2 or * later. See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #ifdef CONFIG_LINUX #include <linux/mman.h> @@ -17,7 +18,6 @@ #define MAP_SHARED_VALIDATE 0x0 #endif /* CONFIG_LINUX */ -#include "qemu/osdep.h" #include "qemu/mmap-alloc.h" #include "qemu/host-utils.h" #include "qemu/cutils.h"
Without it, we never have CONFIG_LINUX defined even if on linux, so linux/mman.h is never really included. Signed-off-by: Peter Xu <peterx@redhat.com> --- util/mmap-alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)