From patchwork Tue Jun 28 15:35:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Add compat eventfd header Date: Tue, 28 Jun 2011 05:35:16 -0000 From: "Michael S. Tsirkin" X-Patchwork-Id: 102418 Message-Id: <20110628153516.GA8596@redhat.com> To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , "Michael S. Tsirkin" , Alexander Graf , Blue Swirl , jan.kiszka@web.de, Paolo Bonzini , Aurelien Jarno 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