]> git.ipfire.org Git - thirdparty/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)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 3 Dec 2012 19:24:20 +0000 (13:24 -0600)
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>
(cherry picked from commit 9bca81624ef9299b9a06013fd29cd6899079aab4)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
configure

index 199a89b4d9be0522cf15e804533a728f60104bd5..bc951583e0ccb9cef3cb71e0f7f727a7a15d4997 100755 (executable)
--- a/configure
+++ b/configure
@@ -2389,8 +2389,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