qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Subject: Re: [PATCH] meson: fix botched compile check conversions
Date: Tue, 16 Nov 2021 15:24:24 +0100	[thread overview]
Message-ID: <9b4b6cba-2d68-a4aa-2e1f-50e6532d9916@redhat.com> (raw)
In-Reply-To: <YZOSboL0YCFKYFh3@redhat.com>

On 11/16/21 12:13, Daniel P. Berrangé wrote:
> On Tue, Nov 16, 2021 at 10:38:34AM +0100, Paolo Bonzini wrote:
>> Fix a bunch of incorrect conversions from configure to Meson, which result
>> in different outcomes with --extra-cflags=-Werror.
>>
>> pthread_setname_np needs "#define _GNU_SOURCE" on Linux (which I am using
>> also for the non-Linux check, so that it correctly fails with an error
>> about having too few parameters).
>>
>> Fix struct checks to use has_type instead of has_symbol, and "#define
>> _GNU_SOURCE" too in the case of struct mmsghdr.
> 
> Ok, so relies on fact that passing an incorrect number of arguments
> is a fatal error, when function prototypes are available, even
> without -Werror being set.
> 
> Side note, GCC looks to be trying to make explicit function prototypes
> mandatory at last
> 
>    https://linuxplumbersconf.org/event/11/contributions/1014/

Yes, and that's also why Meson adds the -Werror=implicit-declaration 
option; these days it's simply too dangerous to assume a function is 
present, if it links but you don't really know which header it comes from.

Paolo



  reply	other threads:[~2021-11-16 14:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-16  9:38 [PATCH] meson: fix botched compile check conversions Paolo Bonzini
2021-11-16 11:13 ` Daniel P. Berrangé
2021-11-16 14:24   ` Paolo Bonzini [this message]
2021-11-16 11:51 ` Peter Maydell
2021-11-16 12:00   ` Daniel P. Berrangé
2021-11-16 13:10     ` Peter Maydell
2021-11-16 13:15       ` Daniel P. Berrangé
2021-11-16 14:31     ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9b4b6cba-2d68-a4aa-2e1f-50e6532d9916@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=berrange@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).