Patchwork [1/1] Include sys/mman.h before qemu-options.h

login
register
mail settings
Submitter Jes Sorensen
Date July 6, 2010, 8:50 a.m.
Message ID <1278406227-27774-2-git-send-email-Jes.Sorensen@redhat.com>
Download mbox | patch
Permalink /patch/57987/
State New
Headers show

Comments

Jes Sorensen - July 6, 2010, 8:50 a.m.
From: Jes Sorensen <Jes.Sorensen@redhat.com>

The result of parsing qemu-options.def depends on whehter or not
MAP_POPULATE is defined, so make sure to include sys/mman.h before
including qemu-options.h.

Reported by Frank Arnold.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
 os-posix.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Anthony Liguori - July 6, 2010, 3:46 p.m.
On 07/06/2010 03:50 AM, Jes.Sorensen@redhat.com wrote:
> From: Jes Sorensen<Jes.Sorensen@redhat.com>
>
> The result of parsing qemu-options.def depends on whehter or not
> MAP_POPULATE is defined, so make sure to include sys/mman.h before
> including qemu-options.h.
>
> Reported by Frank Arnold.
>
> Signed-off-by: Jes Sorensen<Jes.Sorensen@redhat.com>
>    

Applied.  Thanks.

Regards,

Anthony Liguori
> ---
>   os-posix.c |    2 ++
>   1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/os-posix.c b/os-posix.c
> index 804e20c..00133a0 100644
> --- a/os-posix.c
> +++ b/os-posix.c
> @@ -28,6 +28,8 @@
>   #include<signal.h>
>   #include<sys/types.h>
>   #include<sys/wait.h>
> +/*needed for MAP_POPULATE before including qemu-options.h */
> +#include<sys/mman.h>
>   #include<pwd.h>
>   #include<libgen.h>
>
>

Patch

diff --git a/os-posix.c b/os-posix.c
index 804e20c..00133a0 100644
--- a/os-posix.c
+++ b/os-posix.c
@@ -28,6 +28,8 @@ 
 #include <signal.h>
 #include <sys/types.h>
 #include <sys/wait.h>
+/*needed for MAP_POPULATE before including qemu-options.h */
+#include <sys/mman.h>
 #include <pwd.h>
 #include <libgen.h>