From 71d3b34bd7a7c5f210081e5063d0ea2f4c44cb70 Mon Sep 17 00:00:00 2001 From: Pascal Wittmann Date: Thu, 24 Mar 2016 22:19:35 +0100 Subject: tpm-tools: fix build by applying debians patch --- .../03-fix-bool-error-parseStringWithValues.patch | 30 ++++++++++++++++++++++ pkgs/tools/security/tpm-tools/default.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/tools/security/tpm-tools/03-fix-bool-error-parseStringWithValues.patch (limited to 'pkgs/tools/security/tpm-tools') diff --git a/pkgs/tools/security/tpm-tools/03-fix-bool-error-parseStringWithValues.patch b/pkgs/tools/security/tpm-tools/03-fix-bool-error-parseStringWithValues.patch new file mode 100644 index 000000000000..87f7b8e815b3 --- /dev/null +++ b/pkgs/tools/security/tpm-tools/03-fix-bool-error-parseStringWithValues.patch @@ -0,0 +1,30 @@ +Title: Fix boolean comparison error (and FTBFS with gcc-5) +Date: 2015-06-28 +Author: Pierre Chifflier +Bug-Debian: http://bugs.debian.org/778147 +Index: tpm-tools/src/tpm_mgmt/tpm_nvcommon.c +=================================================================== +--- tpm-tools.orig/src/tpm_mgmt/tpm_nvcommon.c ++++ tpm-tools/src/tpm_mgmt/tpm_nvcommon.c +@@ -140,8 +140,8 @@ int parseStringWithValues(const char *aA + aArg); + return -1; + } +- if (!aArg[offset+numbytes] == '|' && +- !aArg[offset+numbytes] == 0) { ++ if (!(aArg[offset+numbytes] == '|' || ++ aArg[offset+numbytes] == 0)) { + logError(_("Illegal character following " + "hexadecimal number in %s\n"), + aArg + offset); +@@ -164,8 +164,8 @@ int parseStringWithValues(const char *aA + return -1; + } + +- if (!aArg[offset+numbytes] == '|' && +- !aArg[offset+numbytes] == 0) { ++ if (!(aArg[offset+numbytes] == '|' || ++ aArg[offset+numbytes] == 0)) { + logError(_("Illegal character following decimal " + "number in %s\n"), + aArg + offset); diff --git a/pkgs/tools/security/tpm-tools/default.nix b/pkgs/tools/security/tpm-tools/default.nix index a17bff9e32c8..264beae9dc4b 100644 --- a/pkgs/tools/security/tpm-tools/default.nix +++ b/pkgs/tools/security/tpm-tools/default.nix @@ -13,6 +13,8 @@ stdenv.mkDerivation rec { buildInputs = [ trousers openssl opencryptoki ]; + patches = [ ./03-fix-bool-error-parseStringWithValues.patch ]; + meta = with stdenv.lib; { description = "Management tools for TPM hardware"; longDescription = '' -- cgit 1.4.1