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.
This commit is contained in:
Colomban Wendling 2023-12-19 11:29:39 +01:00
parent 30d6e911c4
commit 7e9f2dadc6

View File

@ -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 <stddef.h>
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);