From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] qemu-kvm: add compat eventfd Date: Mon, 17 Aug 2009 11:06:05 +0300 Message-ID: <4A890F6D.40308@redhat.com> References: <20090816142432.GA5572@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: "Michael S. Tsirkin" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:54259 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757189AbZHQIGG (ORCPT ); Mon, 17 Aug 2009 04:06:06 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7H867GX031510 for ; Mon, 17 Aug 2009 04:06:07 -0400 In-Reply-To: <20090816142432.GA5572@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 08/16/2009 05:24 PM, Michael S. Tsirkin wrote: > Support build on rhel 5.3 where we have syscall for eventfd but not > userspace wrapper. > > Signed-off-by: Michael S. Tsirkin > --- > compat/sys/eventfd.h | 13 +++++++++++++ > configure | 1 + > 2 files changed, 14 insertions(+), 0 deletions(-) > create mode 100644 compat/sys/eventfd.h > > diff --git a/compat/sys/eventfd.h b/compat/sys/eventfd.h > new file mode 100644 > index 0000000..f55d96a > --- /dev/null > +++ b/compat/sys/eventfd.h > @@ -0,0 +1,13 @@ > +#ifndef _COMPAT_SYS_EVENTFD > +#define _COMPAT_SYS_EVENTFD > + > +#include > +#include > + > + > +static inline int eventfd (int count, int flags) > +{ > + return syscall(SYS_eventfd, count, flags); > +} > + > +#endif > diff --git a/configure b/configure > index 84af8bd..bb2680f 100755 > --- a/configure > +++ b/configure > @@ -866,6 +866,7 @@ if test "$kvm" = "yes" ; then > > kvm_cflags="-I$source_path/kvm/include" > kvm_cflags="$kvm_cflags -I$source_path/kvm/include/$kvm_arch" > +kvm_cflags="$kvm_cflags -I$source_path/compat" > > er, that will override sys/eventfd.h even if it does exist. We need to prefer the system eventfd.h to ours. -- error compiling committee.c: too many arguments to function