mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-07 08:36:02 -10:00
modeline_edid.c called strlcpy with no <compat/strl.h> and reached master: glibc 2.38 declares strlcpy and strlcat itself, so it built clean here and passed both syntax-check passes, while MXE, clang and the webOS toolchain - which have only libretro-common's declaration - did not. Neither pass could have caught it, since both ask the host's headers what exists. A grep can, and does not care what the host provides: a .c that uses strlcpy, strlcat, strlcpy_lit, strlcat_lit or strcasestr must include the compat header itself rather than lean on whatever a project header dragged in, which is the standing rule anyway. It runs as pass 0 of tools/mingw_syntax_check.sh, so it fires on the files being checked before delivery and costs nothing. Fourteen files were leaning on the transitive declaration and now include it directly: the font driver and its freetype renderer, the widgets, vulkan_common, the GX2, PS2 and OGA drivers, the Android display server, the screensaver and cancel callbacks, the audio driver, the test input and joypad drivers, and the webOS Wayland helper. No behaviour changes; the ones this host can build were checked, and the failures that remain there are the ones master already had.