summary refs log tree commit diff stats
path: root/util/qemu-coroutine-lock.c
diff options
context:
space:
mode:
authorMichal Privoznik <mprivozn@redhat.com>2023-05-30 12:31:23 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2023-06-06 09:42:14 +0200
commit09a49afeae2542993d4cdc5d7af22abdfce7a3ba (patch)
tree840d62cb13ac3fb40ab6fd0fe1674a33100bddde /util/qemu-coroutine-lock.c
parent369081c4558e7e940fa36ce59bf17b2e390f55d3 (diff)
downloadfocaccia-qemu-09a49afeae2542993d4cdc5d7af22abdfce7a3ba.tar.gz
focaccia-qemu-09a49afeae2542993d4cdc5d7af22abdfce7a3ba.zip
meson: Avoid implicit declaration of absent functions
While detecting a presence of a function via 'cc.links()'
gives desired result (i.e. detects whether function is present),
it also produces a warning on systems where the function is not
present (into meson-log.txt), e.g.:

  qemu.git/build/meson-private/tmph74x3p38/testfile.c:2:34: \
  warning: implicit declaration of function 'malloc_trim' [-Wimplicit-function-declaration]

And some distributions (e.g. Gentoo) parse the meson log and
consider these erroneous because it can lead to feature
misdetection (see [1]).

We can check whether given function exists via
'cc.has_function()' or whether STATX_* macros exist via
'cc.has_header_symbol()'.

1: https://wiki.gentoo.org/wiki/Modern_C_porting
Resolves: https://bugs.gentoo.org/898810
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Message-Id: <8e02776d18595a1c575c90a189ff65f1785f76ca.1685442612.git.mprivozn@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'util/qemu-coroutine-lock.c')
0 files changed, 0 insertions, 0 deletions