qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] migration/postcopy-ram: Guard use of sys/eventf


From: Juan Quintela
Subject: Re: [Qemu-devel] [PATCH] migration/postcopy-ram: Guard use of sys/eventfd.h with CONFIG_EVENTFD
Date: Wed, 24 Feb 2016 12:41:21 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Matthew Fortune <address@hidden> wrote:
> sys/eventfd.h was being guarded only by a check for linux but does
> not exist on older distributions like CentOS 5. Move the include
> into the code that uses it and add an appropriate guard.
>
> Signed-off-by: Matthew Fortune <address@hidden>
> ---
>  migration/postcopy-ram.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>

Reviewed-by: Juan Quintela <address@hidden>

Thanks.

> diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c
> index 254c629..fbd0064 100644
> --- a/migration/postcopy-ram.c
> +++ b/migration/postcopy-ram.c
> @@ -52,14 +52,14 @@ struct PostcopyDiscardState {
>  #if defined(__linux__)
>  
>  #include <poll.h>
> -#include <sys/eventfd.h>
>  #include <sys/mman.h>
>  #include <sys/ioctl.h>
>  #include <sys/syscall.h>
>  #include <asm/types.h> /* for __u64 */
>  #endif
>  
> -#if defined(__linux__) && defined(__NR_userfaultfd)
> +#if defined(__linux__) && defined(__NR_userfaultfd) && 
> defined(CONFIG_EVENTFD)
> +#include <sys/eventfd.h>
>  #include <linux/userfaultfd.h>
>  
>  static bool ufd_version_check(int ufd)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]