]> git.proxmox.com Git - mirror_qemu.git/commitdiff
configure: avoid compiler warning in pipe2 detection
authorBruce Rogers <brogers@suse.com>
Mon, 20 Aug 2012 18:45:08 +0000 (12:45 -0600)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 27 Oct 2012 14:21:04 +0000 (14:21 +0000)
When building qemu-kvm for openSUSE:Factory, I am getting a
warning in the pipe2 detection performed by configure, which
prevents using --enable-werror.

Change detection code to use return value of pipe2.

Signed-off-by: Bruce Rogers <brogers@suse.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
configure

index 34ba9c7199eb563f4a150c963bf85a262cd22384..37f712d4758eb65aa675fee79ac2472da7c85d67 100755 (executable)
--- a/configure
+++ b/configure
@@ -2399,8 +2399,7 @@ cat > $TMPC << EOF
 int main(void)
 {
     int pipefd[2];
-    pipe2(pipefd, O_CLOEXEC);
-    return 0;
+    return pipe2(pipefd, O_CLOEXEC);
 }
 EOF
 if compile_prog "" "" ; then