ggit-index.c:347:2: error: implicit declaration of function 'g_string_replace' is invalid in C99
macOS version: 12.4 (Monterey)
libgit2 version: 1.5.0
ligit2-glib version: 1.1.0
The error:
:info:build FAILED: libgit2-glib/libgit2-glib-1.0.0.dylib.p/ggit-index.c.o
:info:build ccache /usr/bin/clang -Ilibgit2-glib/libgit2-glib-1.0.0.dylib.p -Ilibgit2-glib -I../libgit2-glib-1.1.0/libgit2-glib -I. -I../libgit2-glib-1.1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -fcolor-diagnostics -Wall -Winvalid-pch -O2 -g -ffast-math -fstrict-aliasing -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wcast-align -Wno-unused-local-typedefs -Werror=implicit -Werror=init-self -Werror=main -Werror=missing-braces -Werror=return-type -Werror=array-bounds -Werror=write-strings -DLIBGIT2_GLIB_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS -DTRANSLATE_WINDOWS_PATHS -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -arch x86_64 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -DGIT_SSH=1 '-DG_LOG_DOMAIN="Ggit"' -MD -MQ libgit2-glib/libgit2-glib-1.0.0.dylib.p/ggit-index.c.o -MF libgit2-glib/libgit2-glib-1.0.0.dylib.p/ggit-index.c.o.d -o libgit2-glib/libgit2-glib-1.0.0.dylib.p/ggit-index.c.o -c ../libgit2-glib-1.1.0/libgit2-glib/ggit-index.c
:info:build ../libgit2-glib-1.1.0/libgit2-glib/ggit-index.c:347:2: error: implicit declaration of function 'g_string_replace' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
:info:build g_string_replace (gs_path, "\\", "/", 0);
:info:build ^
:info:build ../libgit2-glib-1.1.0/libgit2-glib/ggit-index.c:468:2: error: implicit declaration of function 'g_string_replace' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
:info:build g_string_replace (gs_path, "\\", "/", 0);
:info:build ^
:info:build 2 errors generated.
The full log: libgit2-glib.log