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 via email to