From 7e9f2dadc6d44674d529a8ddfd252987f482bf5f Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 19 Dec 2023 11:29:39 +0100 Subject: [PATCH] Fix detecting size_t size when `-Wmissing-prototypes` is in CFLAGS As this test includes `-Werror`, we need to be extra careful in which warnings this code could trigger. --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 7981c90e9..0ee4ca014 100644 --- a/meson.build +++ b/meson.build @@ -1699,7 +1699,7 @@ if cc.get_id() == 'gcc' or cc.get_id() == 'clang' g_sizet_compatibility += { type_name: size_compatibility and cc.compiles( '''#include - size_t f (size_t *i) { return *i + 1; } + static size_t f (size_t *i) { return *i + 1; } int main (void) { unsigned ''' + type_name + ''' i = 0; f (&i);