Merge branch 'meson-size_t-check' into 'main'

Fix detecting size_t size when `-Wmissing-prototypes` is in CFLAGS

See merge request GNOME/glib!3777
This commit is contained in:
Michael Catanzaro 2023-12-21 12:20:21 +00:00
commit af6bf99495

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);