Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: just copy the TPMU_HA union instead of copying its member
The TPMU_HA is just a union data type, so instead of attempting to copy .na field, copy the union since both refer to the same memory location. This also allows the tpm2-tools to be built against the tpm2-tss 1.x since the TPMU_HA union doesn't have a .na field in that version. So it prevents the following build error: lib/tpm2_alg_util.c: In function ‘tpm2_extract_plain_signature’: lib/tpm2_alg_util.c:348:33: error: ‘TPMU_HA {aka union <anonymous>}’ has no member named ‘na’ memcpy(buffer, &hmac_sig->na, *size); ^~ make: *** [Makefile:1871: lib/tpm2_alg_util.o] Error 1 Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
- Loading branch information