Index: kvm-14/configure =================================================================== --- kvm-14.orig/configure 2007-02-22 11:46:09.000000000 +0100 +++ kvm-14/configure 2007-02-22 11:46:55.000000000 +0100 @@ -87,7 +87,7 @@ --enable-kvm --kernel-path="$libkvm_kerneldir" \ --enable-alsa \ ${disable_gcc_check:+"--disable-gcc-check"} \ - --prefix="$prefix" + --prefix="$prefix" --enable-libposix-aio ) Index: kvm-14/qemu/Makefile =================================================================== --- kvm-14.orig/qemu/Makefile 2007-02-22 11:46:09.000000000 +0100 +++ kvm-14/qemu/Makefile 2007-02-22 11:46:12.000000000 +0100 @@ -27,10 +27,14 @@ ifndef CONFIG_DARWIN ifndef CONFIG_WIN32 ifndef CONFIG_SOLARIS +ifdef USE_LIBPOSIX_AIO +LIBS+=-lposix-aio +else LIBS+=-lrt endif endif endif +endif all: $(TOOLS) $(DOCS) recurse-all Index: kvm-14/qemu/Makefile.target =================================================================== --- kvm-14.orig/qemu/Makefile.target 2007-02-22 11:46:09.000000000 +0100 +++ kvm-14/qemu/Makefile.target 2007-02-22 11:46:12.000000000 +0100 @@ -452,7 +452,11 @@ ifndef CONFIG_DARWIN ifndef CONFIG_WIN32 ifndef CONFIG_SOLARIS -VL_LIBS=-lutil -lrt -luuid +VL_LIBS=-lutil +ifdef USE_LIBPOSIX_AIO +VL_LIBS+=-lposix-aio +endif +VL_LIBS+=-lrt -luuid endif endif endif Index: kvm-14/qemu/block-raw.c =================================================================== --- kvm-14.orig/qemu/block-raw.c 2007-02-22 11:46:09.000000000 +0100 +++ kvm-14/qemu/block-raw.c 2007-02-22 11:46:12.000000000 +0100 @@ -197,7 +197,7 @@ act.sa_handler = aio_signal_handler; sigaction(aio_sig_num, &act, NULL); -#if defined(__GLIBC__) && defined(__linux__) +#if defined(__GLIBC__) && defined(__linux__) && !defined(USE_LIBPOSIX_AIO) { /* XXX: aio thread exit seems to hang on RedHat 9 and this init seems to fix the problem. */ Index: kvm-14/qemu/configure =================================================================== --- kvm-14.orig/qemu/configure 2007-02-22 11:46:09.000000000 +0100 +++ kvm-14/qemu/configure 2007-02-22 11:46:12.000000000 +0100 @@ -99,6 +99,7 @@ linux_user="no" darwin_user="no" build_docs="no" +libposix_aio="no" uname_release="" # OS specific @@ -262,6 +263,8 @@ ;; --enable-uname-release=*) uname_release="$optarg" ;; + --enable-libposix-aio) libposix_aio="yes" + ;; esac done @@ -312,6 +315,7 @@ echo " --fmod-lib path to FMOD library" echo " --fmod-inc path to FMOD includes" echo " --enable-uname-release=R Return R for uname -r in usermode emulation" +echo " --enable-libposix-aio use libposix-aio instead of glibc aio" echo "" echo "NOTE: The object files are built at the place where configure is launched" exit 1 @@ -635,6 +639,7 @@ echo "kqemu support $kqemu" echo "kvm support $kvm" echo "Documentation $build_docs" +echo "libposix-aio $libposix_aio" [ ! -z "$uname_release" ] && \ echo "uname -r $uname_release" @@ -795,6 +800,8 @@ echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_h echo "#define _BSD 1" >> $config_h fi +echo "USE_LIBPOSIX_AIO=yes" >> $config_mak +echo "#define USE_LIBPOSIX_AIO 1" >> $config_h echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h