diff options
author | Ed Tanous <ed.tanous@intel.com> | 2019-04-15 23:11:05 +0300 |
---|---|---|
committer | Ed Tanous <ed.tanous@intel.com> | 2019-04-15 23:11:05 +0300 |
commit | a75bff085ba9443315222231c42692745e5781e9 (patch) | |
tree | e1aa422babae0dffc866af076a0274ff26c2c4b2 /meta-security/meta-tpm/recipes-tpm2/tpm2-totp/files/litpm2_totp_build_fix.patch | |
parent | 3e809d0d5cf96c18c5720d1b6b3b53e9f4c0cfae (diff) | |
parent | 6d4bcf0a75b2a6055055c9ad8ed6b93599082385 (diff) | |
download | openbmc-a75bff085ba9443315222231c42692745e5781e9.tar.xz |
Merge branch 'master' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into intel
Diffstat (limited to 'meta-security/meta-tpm/recipes-tpm2/tpm2-totp/files/litpm2_totp_build_fix.patch')
-rw-r--r-- | meta-security/meta-tpm/recipes-tpm2/tpm2-totp/files/litpm2_totp_build_fix.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/meta-security/meta-tpm/recipes-tpm2/tpm2-totp/files/litpm2_totp_build_fix.patch b/meta-security/meta-tpm/recipes-tpm2/tpm2-totp/files/litpm2_totp_build_fix.patch new file mode 100644 index 000000000..c14705458 --- /dev/null +++ b/meta-security/meta-tpm/recipes-tpm2/tpm2-totp/files/litpm2_totp_build_fix.patch @@ -0,0 +1,36 @@ +C99 fixes: + + src/libtpm2-totp.c:172:13: error: format '%li' expects argument of type 'long int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Werror=format=] +| dbg("Calling Esys_GetRandom for %li bytes", SECRETLEN - *secret_size); + +src/tpm2-totp.c:343:23: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'uint64_t' {aka 'long long unsigned int'} [-Werror=format=] + +Upstream-Status: Pending +Signed-off-by: Armin Kuster <akuster808@gmail.com> + +Index: git/src/libtpm2-totp.c +=================================================================== +--- git.orig/src/libtpm2-totp.c ++++ git/src/libtpm2-totp.c +@@ -169,7 +169,7 @@ tpm2totp_generateKey(uint32_t pcrs, uint + if (rc != TPM2_RC_INITIALIZE) chkrc(rc, goto error); + + while (*secret_size < SECRETLEN) { +- dbg("Calling Esys_GetRandom for %li bytes", SECRETLEN - *secret_size); ++ dbg("Calling Esys_GetRandom for %li bytes", (long int) (SECRETLEN - *secret_size)); + rc = Esys_GetRandom(ctx, + ESYS_TR_NONE, ESYS_TR_NONE, ESYS_TR_NONE, + SECRETLEN - *secret_size, &t); +Index: git/src/tpm2-totp.c +=================================================================== +--- git.orig/src/tpm2-totp.c ++++ git/src/tpm2-totp.c +@@ -340,7 +340,7 @@ main(int argc, char **argv) + localtime (&now)); + chkrc(rc, exit(1)); + } +- printf("%s%06ld", timestr, totp); ++ printf("%s%06ld", timestr, (long int)totp); + break; + case CMD_RESEAL: + rc = tpm2totp_loadKey_nv(opt.nvindex, &keyBlob, &keyBlob_size); |