Patchwork [25/43] configure: avoid compiler warning in pipe2 detection

login
register
mail settings
Submitter Michael Roth
Date Dec. 3, 2012, 10:08 p.m.
Message ID <1354572547-21271-26-git-send-email-mdroth@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/203502/
State New
Headers show

Comments

Michael Roth - Dec. 3, 2012, 10:08 p.m.
From: Bruce Rogers <brogers@suse.com>

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 |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch

diff --git a/configure b/configure
index 199a89b..bc95158 100755
--- 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