Patchwork Fix qemu_eventfd compile when !CONFIG_EVENTFD

login
register
mail settings
Submitter Paolo Bonzini
Date Feb. 23, 2010, 9:16 a.m.
Message ID <1266916613-13238-1-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/46057/
State New
Headers show

Comments

Paolo Bonzini - Feb. 23, 2010, 9:16 a.m.
From: Avi Kivity <avi@redhat.com>

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 osdep.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Blue Swirl - Feb. 23, 2010, 5:46 p.m.
Thanks, applied.

On 2/23/10, Paolo Bonzini <pbonzini@redhat.com> wrote:
> From: Avi Kivity <avi@redhat.com>
>
>  Signed-off-by: Avi Kivity <avi@redhat.com>
>  Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>  ---
>   osdep.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
>  diff --git a/osdep.c b/osdep.c
>  index 3bab79a..4d39f2c 100644
>  --- a/osdep.c
>  +++ b/osdep.c
>  @@ -293,9 +293,9 @@ ssize_t qemu_write_full(int fd, const void *buf, size_t count)
>   */
>   int qemu_eventfd(int fds[2])
>   {
>  +#ifdef CONFIG_EVENTFD
>      int ret;
>
>  -#ifdef CONFIG_EVENTFD
>      ret = eventfd(0, 0);
>      if (ret >= 0) {
>          fds[0] = ret;
>
> --
>  1.6.6
>
>
>
>

Patch

diff --git a/osdep.c b/osdep.c
index 3bab79a..4d39f2c 100644
--- a/osdep.c
+++ b/osdep.c
@@ -293,9 +293,9 @@  ssize_t qemu_write_full(int fd, const void *buf, size_t count)
  */
 int qemu_eventfd(int fds[2])
 {
+#ifdef CONFIG_EVENTFD
     int ret;
 
-#ifdef CONFIG_EVENTFD
     ret = eventfd(0, 0);
     if (ret >= 0) {
         fds[0] = ret;