Переглянути джерело

configure: avoid compiler warning in pipe2 detection

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>
Bruce Rogers 13 роки тому
батько
коміт
ea79e157c6
1 змінених файлів з 1 додано та 2 видалено
  1. 1 2
      configure

+ 1 - 2
configure

@@ -2389,8 +2389,7 @@ cat > $TMPC << EOF
 int main(void)
 int main(void)
 {
 {
     int pipefd[2];
     int pipefd[2];
-    pipe2(pipefd, O_CLOEXEC);
-    return 0;
+    return pipe2(pipefd, O_CLOEXEC);
 }
 }
 EOF
 EOF
 if compile_prog "" "" ; then
 if compile_prog "" "" ; then