Merge pull request #142187 from IvarWithoutBones/fix/hactool-musl

authored by

Sandro and committed by
GitHub
2f37b3df ab57b395

+16
+3
pkgs/tools/compression/hactool/default.nix
··· 11 sha256 = "0305ngsnwm8npzgyhyifasi4l802xnfz19r0kbzzniirmcn4082d"; 12 }; 13 14 preBuild = '' 15 mv config.mk.template config.mk 16 ''; 17 18 makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; 19 20 installPhase = '' 21 install -D hactool $out/bin/hactool
··· 11 sha256 = "0305ngsnwm8npzgyhyifasi4l802xnfz19r0kbzzniirmcn4082d"; 12 }; 13 14 + patches = [ ./musl-compat.patch ]; 15 + 16 preBuild = '' 17 mv config.mk.template config.mk 18 ''; 19 20 makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; 21 + enableParallelBuilding = true; 22 23 installPhase = '' 24 install -D hactool $out/bin/hactool
+13
pkgs/tools/compression/hactool/musl-compat.patch
···
··· 1 + diff --git a/main.c b/main.c 2 + index 07f53cb..f2265df 100644 3 + --- a/main.c 4 + +++ b/main.c 5 + @@ -369,7 +369,7 @@ int main(int argc, char **argv) { 6 + return EXIT_FAILURE; 7 + } 8 + nca_ctx.tool_ctx->base_file_type = BASEFILE_FAKE; 9 + - nca_ctx.tool_ctx->base_file++; /* Guarantees base_file != NULL. I'm so sorry. */ 10 + + if (!nca_ctx.tool_ctx->base_file) nca_ctx.tool_ctx->base_file = (FILE*) 1; 11 + break; 12 + case 32: 13 + tool_ctx.action |= ACTION_ONLYUPDATEDROMFS;