From: Juan Quintela <quintela@redhat.com>
To: Matthew Fortune <Matthew.Fortune@imgtec.com>
Cc: Amit Shah <amit.shah@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
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 [thread overview]
Message-ID: <87vb5el4im.fsf@emacs.mitica> (raw)
In-Reply-To: <6D39441BF12EF246A7ABCE6654B023536BB85DEB@hhmail02.hh.imgtec.org> (Matthew Fortune's message of "Tue, 23 Feb 2016 16:09:15 +0000")
Matthew Fortune <Matthew.Fortune@imgtec.com> 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 <matthew.fortune@imgtec.com>
> ---
> migration/postcopy-ram.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Reviewed-by: Juan Quintela <quintela@redhat.com>
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)
prev parent reply other threads:[~2016-02-24 11:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-23 16:09 [Qemu-devel] [PATCH] migration/postcopy-ram: Guard use of sys/eventfd.h with CONFIG_EVENTFD Matthew Fortune
2016-02-24 11:41 ` Juan Quintela [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vb5el4im.fsf@emacs.mitica \
--to=quintela@redhat.com \
--cc=Matthew.Fortune@imgtec.com \
--cc=amit.shah@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.