[PATCH RFC 04/21] madvise: Include linux/mman.h under linux-headers/

Peter Xu posted 21 patches 3 years ago
Maintainers: David Hildenbrand <david@redhat.com>, Igor Mammedov <imammedo@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Peter Xu <peterx@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Cornelia Huck <cohuck@redhat.com>, Juan Quintela <quintela@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>
[PATCH RFC 04/21] madvise: Include linux/mman.h under linux-headers/
Posted by Peter Xu 3 years ago
This will allow qemu/madvise.h to always include linux/mman.h under the
linux-headers/.

Signed-off-by: Peter Xu <peterx@redhat.com>
---
 include/qemu/madvise.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/qemu/madvise.h b/include/qemu/madvise.h
index e155f59a0d..b6fa49553f 100644
--- a/include/qemu/madvise.h
+++ b/include/qemu/madvise.h
@@ -8,6 +8,10 @@
 #ifndef QEMU_MADVISE_H
 #define QEMU_MADVISE_H
 
+#ifdef CONFIG_LINUX
+#include "linux/mman.h"
+#endif
+
 #define QEMU_MADV_INVALID -1
 
 #if defined(CONFIG_MADVISE)
-- 
2.37.3
Re: [PATCH RFC 04/21] madvise: Include linux/mman.h under linux-headers/
Posted by Juan Quintela 3 years ago
Peter Xu <peterx@redhat.com> wrote:
> This will allow qemu/madvise.h to always include linux/mman.h under the
> linux-headers/.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>

Reviewed-by: Juan Quintela <quintela@redhat.com>
Re: [PATCH RFC 04/21] madvise: Include linux/mman.h under linux-headers/
Posted by Dr. David Alan Gilbert 3 years ago
* Peter Xu (peterx@redhat.com) wrote:
> This will allow qemu/madvise.h to always include linux/mman.h under the
> linux-headers/.
> 
> Signed-off-by: Peter Xu <peterx@redhat.com>

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> ---
>  include/qemu/madvise.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/qemu/madvise.h b/include/qemu/madvise.h
> index e155f59a0d..b6fa49553f 100644
> --- a/include/qemu/madvise.h
> +++ b/include/qemu/madvise.h
> @@ -8,6 +8,10 @@
>  #ifndef QEMU_MADVISE_H
>  #define QEMU_MADVISE_H
>  
> +#ifdef CONFIG_LINUX
> +#include "linux/mman.h"
> +#endif
> +
>  #define QEMU_MADV_INVALID -1
>  
>  #if defined(CONFIG_MADVISE)
> -- 
> 2.37.3
> 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK