From patchwork Mon Aug 17 08:13:11 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 41951 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7H8EaO6010264 for ; Mon, 17 Aug 2009 08:14:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757341AbZHQIOc (ORCPT ); Mon, 17 Aug 2009 04:14:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757332AbZHQIOc (ORCPT ); Mon, 17 Aug 2009 04:14:32 -0400 Received: from mx2.redhat.com ([66.187.237.31]:54549 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757331AbZHQIOb (ORCPT ); Mon, 17 Aug 2009 04:14:31 -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 n7H8EWvc001170 for ; Mon, 17 Aug 2009 04:14:32 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n7H8EVh1028532; Mon, 17 Aug 2009 04:14:31 -0400 Received: from redhat.com (vpn-6-31.tlv.redhat.com [10.35.6.31]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n7H8ESGQ008960; Mon, 17 Aug 2009 04:14:30 -0400 Date: Mon, 17 Aug 2009 11:13:11 +0300 From: "Michael S. Tsirkin" To: avi@redhat.com, kvm@vger.kernel.org Subject: [PATCHv2] qemu-kvm: add compat eventfd Message-ID: <20090817081311.GA8572@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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..2dd0ce8 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 -idirafter $source_path/compat" # test for KVM_CAP_PIT