backends/tpm: Exclude headers and macros that don't exist on win32

These headers and macros do not exist on Windows. Exclude them.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Message-Id: <20220824094029.1634519-15-bmeng.cn@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
Bin Meng 2022-08-24 17:39:52 +08:00 committed by Thomas Huth
parent 2549f6102e
commit d1c637ecff
1 changed files with 4 additions and 0 deletions

View File

@ -9,8 +9,10 @@
#ifndef TPM_IOCTL_H
#define TPM_IOCTL_H
#ifndef _WIN32
#include <sys/uio.h>
#include <sys/ioctl.h>
#endif
#ifdef HAVE_SYS_IOCCOM_H
#include <sys/ioccom.h>
@ -222,6 +224,7 @@ typedef struct ptm_setbuffersize ptm_setbuffersize;
#define PTM_CAP_SET_DATAFD (1 << 12)
#define PTM_CAP_SET_BUFFERSIZE (1 << 13)
#ifndef _WIN32
enum {
PTM_GET_CAPABILITY = _IOR('P', 0, ptm_cap),
PTM_INIT = _IOWR('P', 1, ptm_init),
@ -241,6 +244,7 @@ enum {
PTM_SET_DATAFD = _IOR('P', 15, ptm_res),
PTM_SET_BUFFERSIZE = _IOWR('P', 16, ptm_setbuffersize),
};
#endif
/*
* Commands used by the non-CUSE TPMs