aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-12-07 11:04:32 +0200
committerAvi Kivity <avi@redhat.com>2009-12-07 11:04:32 +0200
commit149d76049af52aa76f4665b6bc9bdbd5904a8588 (patch)
treee07c6dfe28f03438dff9bb07240a7534c010f990 /configure
parentMerge commit 'e9b2e81889d9877415710484b876ee57a42b0bcb' into upstream-merge (diff)
parentDon't leak file descriptors (diff)
downloadqemu-kvm-149d76049af52aa76f4665b6bc9bdbd5904a8588.tar.gz
qemu-kvm-149d76049af52aa76f4665b6bc9bdbd5904a8588.tar.bz2
qemu-kvm-149d76049af52aa76f4665b6bc9bdbd5904a8588.zip
Merge commit '40ff6d7e8dceca227e7f8a3e8e0d58b2c66d19b4' into upstream-merge
* commit '40ff6d7e8dceca227e7f8a3e8e0d58b2c66d19b4': Don't leak file descriptors qemu-img: There is more than one host device driver qcow2: Fix some more qemu_malloc fallout qcow2: Store exact backing format length virtio-blk: Implement rerror option ide: Implement rerror option Conflicts: posix-aio-compat.c Extended qemu_set_cloexec() to compatfd.c. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure b/configure
index d5f53f8b7..cc01192ac 100755
--- a/configure
+++ b/configure
@@ -1693,6 +1693,23 @@ if compile_prog "" "" ; then
pipe2=yes
fi
+# check if accept4 is there
+accept4=no
+cat > $TMPC << EOF
+#define _GNU_SOURCE
+#include <sys/socket.h>
+#include <stddef.h>
+
+int main(void)
+{
+ accept4(0, NULL, NULL, SOCK_CLOEXEC);
+ return 0;
+}
+EOF
+if compile_prog "" "" ; then
+ accept4=yes
+fi
+
# check if tee/splice is there. vmsplice was added same time.
splice=no
cat > $TMPC << EOF
@@ -2170,6 +2187,9 @@ fi
if test "$pipe2" = "yes" ; then
echo "CONFIG_PIPE2=y" >> $config_host_mak
fi
+if test "$accept4" = "yes" ; then
+ echo "CONFIG_ACCEPT4=y" >> $config_host_mak
+fi
if test "$splice" = "yes" ; then
echo "CONFIG_SPLICE=y" >> $config_host_mak
fi