EMSGSIZE was only added to OpenBSD very recently. To make QEMU compileable on older OpenBSD versions use EMSGSIZE instead when a mismatch between number of received bytes and message size in- dicated in the header was found.
Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- hw/tpm/tpm_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/tpm/tpm_util.c b/hw/tpm/tpm_util.c index fb929f6..1129155 100644 --- a/hw/tpm/tpm_util.c +++ b/hw/tpm/tpm_util.c @@ -91,7 +91,7 @@ static int tpm_util_test(int fd, resp = (struct tpm_resp_hdr *)buf; /* check the header */ if (be32_to_cpu(resp->len) != n) { - return EBADMSG; + return EMSGSIZE; } *return_tag = be16_to_cpu(resp->tag); -- 2.5.5