diff mbox series

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

Message ID 20230117220914.2062125-5-peterx@redhat.com
State New
Headers show
Series migration: Support hugetlb doublemaps | expand

Commit Message

Peter Xu Jan. 17, 2023, 10:08 p.m. UTC
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(+)

Comments

Dr. David Alan Gilbert Jan. 18, 2023, 12:08 p.m. UTC | #1
* 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
>
Juan Quintela Jan. 30, 2023, 5:01 a.m. UTC | #2
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>
diff mbox series

Patch

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)