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 9bca81624e)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
This commit is contained in:
Bruce Rogers 2012-08-20 12:45:08 -06:00 committed by Michael Roth
parent 4a8e490cbc
commit ea79e157c6
1 changed files with 1 additions and 2 deletions

3
configure vendored
View File

@ -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