qemu-kvm: add compat eventfd
PATCH v2 1/1 qemu-kvm: add compat eventfd
Support build on rhel 5.3 where we have syscall for eventfd but not userspace wrapper.
Signed-off-by Michael S. Tsirkin <[email protected]>
--- compat/sys/eventfd.h | 13 +++++++++++++ configure | 1 + 2 files changed, 14 insertions(+), 0 deletions(-) create mode 100644 compat/sys/eventfd.h
compat/sys/eventfd.h new file +13 -0
@@ -0,0 +1,13 @@ +#ifndef _COMPAT_SYS_EVENTFD +#define _COMPAT_SYS_EVENTFD + +#include <unistd.h> +#include <syscall.h> + + +static inline int eventfd (int count,int flags) +{ +return syscall (SYS_eventfd, count, flags); +} + +#endif
configure +1 -0
@@ -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
Signature · 1 line
1.6.2.5
Avi Kivity
AppliedQuoted 3 lines · Michael S. Tsirkin
Support build on rhel 5.3 where we have syscall for eventfd but not userspace wrapper.
Applied, thanks.
Signature · 1 line
error compiling committee.c: too many arguments to function