The server has its own copy of mysql.h (include/mysql.h), which comes
before the one of libmariadb in the include path of libmariadbd. It lacked
the declaration of mariadb_set_embedded_hooks(), so embedded_glue.c called
an undeclared function. GCC 11 and MSVC accept that with a warning and the
symbol is found at link time, so it passed local builds; newer compilers
(GCC 14, clang 16 and later) and MSVC with warnings as errors reject it, as
buildbot did on every configuration.
Declare it in the server's mysql.h as in libmariadb's, and take the
libmariadb change that makes -Werror=unused-but-set-variable pass (the
variable only used for the Windows named pipe).
Reproduced with the old header and -Werror=implicit-function-declaration,
and checked that the new one compiles.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>