glibc: fix the broken build for glibc 2.19 with gcc 13.

macos silicon SDK does not contain stat64 (and other LFS extension), and glibc 2.19 makes use of it.

Signed-off-by: Hao Li <hayatelee@gmail.com>
This commit is contained in:
Hao Li 2024-02-19 15:07:42 +08:00 committed by Chris Packham
parent d75c8c3b0f
commit ace8d69df0

View File

@ -249,8 +249,8 @@ glibc_backend_once()
build_cppflags="${build_cppflags} -I${CT_BUILDTOOLS_PREFIX_DIR}/include/"
build_ldflags="${build_ldflags} -lintl -liconv"
case "$CT_BUILD" in
*cygwin*|*freebsd*)
# Additionally, stat in FreeBSD, Cygwin, and possibly others
*cygwin*|*freebsd*|aarch64*darwin*)
# Additionally, stat in FreeBSD, Cygwin, Darwin arm64 and possibly others
# is always 64bit, so replace struct stat64 with stat.
build_cppflags="${build_cppflags} -Dstat64=stat"
;;