From patchwork Tue Jun 28 15:35:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 102418 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 84C0AB6F5F for ; Wed, 29 Jun 2011 02:03:01 +1000 (EST) Received: from localhost ([::1]:57132 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qbakb-00052j-1k for incoming@patchwork.ozlabs.org; Tue, 28 Jun 2011 12:02:57 -0400 Received: from eggs.gnu.org ([140.186.70.92]:36041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbaJv-0008Sg-UB for qemu-devel@nongnu.org; Tue, 28 Jun 2011 11:35:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QbaJu-0007Jd-6y for qemu-devel@nongnu.org; Tue, 28 Jun 2011 11:35:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21451) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbaJt-0007JR-Oj for qemu-devel@nongnu.org; Tue, 28 Jun 2011 11:35:22 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5SFYwJk027484 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 28 Jun 2011 11:34:58 -0400 Received: from redhat.com (vpn-202-180.tlv.redhat.com [10.35.202.180]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p5SFYrSh009926; Tue, 28 Jun 2011 11:34:54 -0400 Date: Tue, 28 Jun 2011 18:35:16 +0300 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <20110628153516.GA8596@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Stefan Hajnoczi , "Michael S. Tsirkin" , Alexander Graf , Blue Swirl , jan.kiszka@web.de, Paolo Bonzini , Aurelien Jarno Subject: [Qemu-devel] [PATCH] Add compat eventfd header X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Support build on RHEL 5.X where we have syscall for eventfd but not userspace wrapper. (cherry-picked from commit 9e3269181e9bc56feb43bcd4e8ce0b82cd543e65 in qemu-kvm.git). Signed-off-by: Michael S. Tsirkin --- compat/sys/eventfd.h | 13 +++++++++++++ configure | 4 +++ 2 files changed, 16 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 856b41e..d757a6a 100755 --- a/configure +++ b/configure @@ -891,6 +891,9 @@ sparc64-bsd-user \ " fi +#compat headers +QEMU_CFLAGS="$QEMU_CFLAGS -idirafter $source_path/compat" + if test x"$show_help" = x"yes" ; then cat << EOF