meson setup fails when glib is subproject
meson setup fails to detect glib when having glib in subprojects. I got the following error:
|Checking if "C_IN in public headers (no arpa/nameser_compat.h needed)" compiles: NO
|Checking if "arpa/nameser_compat.h needed for C_IN" compiles: NO
Couldn't use fallback subproject in subprojects/glib for the dependency glib-2.0
The problem is that the test program used by glib for these checks generate compilation errors when compiled with -std=c11 which is used by glib-networking by default. The compilation renders in errors like:
/usr/include/arpa/nameser.h:111:8: error: unknown type name 'u_char'
The compilation works fine for -std=gnu89 which is used by glib by default. If changing to gnu89 when building glib-networking it all works fine. Is there a reason why glib-networking is not compiling using the same C standard as glib by default?
Edited by Fredrik Ternerot