Merge pull request #288020 from trofi/xcbuild-gcc-13-fix

xcbuild: fix `gcc-13` build failure
This commit is contained in:
Weijia Wang 2024-02-11 19:38:27 +01:00 committed by GitHub
commit 7ec3220532
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -39,6 +39,12 @@ in stdenv.mkDerivation {
'';
postPatch = lib.optionalString (!stdenv.isDarwin) ''
# Fix build on gcc-13 due to missing includes
sed -e '1i #include <cstdint>' -i \
Libraries/libutil/Headers/libutil/Permissions.h \
Libraries/pbxbuild/Headers/pbxbuild/Tool/AuxiliaryFile.h \
Libraries/pbxbuild/Headers/pbxbuild/Tool/Invocation.h
# Avoid a glibc >= 2.25 deprecation warning that gets fatal via -Werror.
sed 1i'#include <sys/sysmacros.h>' \
-i Libraries/xcassets/Headers/xcassets/Slot/SystemVersion.h