From 2e4073c0c6b523f4c073db578c2b8e249e1ccca9 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 11 Feb 2024 12:16:32 +0000 Subject: [PATCH] xcbuild: fix `gcc-13` build failure Without the change build fais on `master as https://hydra.nixos.org/build/249027078: /build/source/Libraries/libutil/Headers/libutil/Permissions.h:23:18: error: 'uint8_t' does not name a type 23 | using Base = uint8_t; | ^~~~~~~ --- pkgs/development/tools/xcbuild/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/tools/xcbuild/default.nix b/pkgs/development/tools/xcbuild/default.nix index 3d11e551478a..8dc527c0e1f5 100644 --- a/pkgs/development/tools/xcbuild/default.nix +++ b/pkgs/development/tools/xcbuild/default.nix @@ -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 ' -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 ' \ -i Libraries/xcassets/Headers/xcassets/Slot/SystemVersion.h