Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

tpm-tools: fix build by applying debians patch

+32
+30
pkgs/tools/security/tpm-tools/03-fix-bool-error-parseStringWithValues.patch
··· 1 + Title: Fix boolean comparison error (and FTBFS with gcc-5) 2 + Date: 2015-06-28 3 + Author: Pierre Chifflier <pollux@debian.org> 4 + Bug-Debian: http://bugs.debian.org/778147 5 + Index: tpm-tools/src/tpm_mgmt/tpm_nvcommon.c 6 + =================================================================== 7 + --- tpm-tools.orig/src/tpm_mgmt/tpm_nvcommon.c 8 + +++ tpm-tools/src/tpm_mgmt/tpm_nvcommon.c 9 + @@ -140,8 +140,8 @@ int parseStringWithValues(const char *aA 10 + aArg); 11 + return -1; 12 + } 13 + - if (!aArg[offset+numbytes] == '|' && 14 + - !aArg[offset+numbytes] == 0) { 15 + + if (!(aArg[offset+numbytes] == '|' || 16 + + aArg[offset+numbytes] == 0)) { 17 + logError(_("Illegal character following " 18 + "hexadecimal number in %s\n"), 19 + aArg + offset); 20 + @@ -164,8 +164,8 @@ int parseStringWithValues(const char *aA 21 + return -1; 22 + } 23 + 24 + - if (!aArg[offset+numbytes] == '|' && 25 + - !aArg[offset+numbytes] == 0) { 26 + + if (!(aArg[offset+numbytes] == '|' || 27 + + aArg[offset+numbytes] == 0)) { 28 + logError(_("Illegal character following decimal " 29 + "number in %s\n"), 30 + aArg + offset);
+2
pkgs/tools/security/tpm-tools/default.nix
··· 13 13 14 14 buildInputs = [ trousers openssl opencryptoki ]; 15 15 16 + patches = [ ./03-fix-bool-error-parseStringWithValues.patch ]; 17 + 16 18 meta = with stdenv.lib; { 17 19 description = "Management tools for TPM hardware"; 18 20 longDescription = ''