On Mon, Mar 9, 2026 at 9:38 AM Mohamed Mediouni <[email protected]> wrote: > Another way would be to have the has_function have -Werror which should be > enough to deal with > this case properly. Does that sound better?
Yes, if that works it's better. For 11.1 we can look into adding -Werror to all cc.has_function() calls. > For meson not sure whether it actually picks up the definition from the > header or tries to use a dummy > definition though from looking at > https://github.com/mesonbuild/meson/blob/6e67be7492d6982d2baf153387f9adbdb480d099/mesonbuild/compilers/mixins/clike.py#L738 > If it picks the definition from the header, having Werror there ought to be > enough. Otherwise, won’t be caught... If you have a "#include <>" in the prefix it will pick the declaration: if '#include' in prefix: head, main = self._have_prototype_templ() else: head, main = self._no_prototype_templ() which is also something that we can add to 11.1. Paolo
