Patchwork configure: avoid compiler warning in pipe2 detection

login
register
mail settings
Submitter Bruce Rogers
Date Aug. 20, 2012, 6:45 p.m.
Message ID <1345488308-10410-1-git-send-email-brogers@suse.com>
Download mbox | patch
Permalink /patch/178920/
State New
Headers show

Comments

Bruce Rogers - Aug. 20, 2012, 6:45 p.m.
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>
---
 configure |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
Peter Maydell - Aug. 20, 2012, 7:40 p.m.
On 20 August 2012 19:45, Bruce Rogers <brogers@suse.com> wrote:
> 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>

-- PMM
Peter Maydell - Oct. 24, 2012, 4:48 p.m.
Ping! Just ran into this bug today and noticed this
patch never got applied.
Patch still applies OK, patchwork url is:
http://patchwork.ozlabs.org/patch/178920/

thanks
-- PMM

On 20 August 2012 19:45, Bruce Rogers <brogers@suse.com> wrote:
> 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>
> ---
>  configure |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index 5808764..2e1f7f8 100755
> --- 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
> --
> 1.7.7
>
>
Andreas Färber - Oct. 24, 2012, 5:20 p.m.
Am 24.10.2012 18:48, schrieb Peter Maydell:
> Ping! Just ran into this bug today and noticed this
> patch never got applied.
> Patch still applies OK, patchwork url is:
> http://patchwork.ozlabs.org/patch/178920/

...and since it was noticed while packaging v1.2, it should go into
stable as well (cc'ed).

Andreas

> On 20 August 2012 19:45, Bruce Rogers <brogers@suse.com> wrote:
>> 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>
>> ---
>>  configure |    3 +--
>>  1 files changed, 1 insertions(+), 2 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 5808764..2e1f7f8 100755
>> --- 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
>> --
>> 1.7.7
Blue Swirl - Oct. 27, 2012, 4:52 p.m.
Thanks, applied.

On Mon, Aug 20, 2012 at 6:45 PM, Bruce Rogers <brogers@suse.com> wrote:
> 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>
> ---
>  configure |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index 5808764..2e1f7f8 100755
> --- 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
> --
> 1.7.7
>
>

Patch

diff --git a/configure b/configure
index 5808764..2e1f7f8 100755
--- 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