To be able to build against older libvirt, we need to conditionally
define the constants, even though they're not exposed in the public
API.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
Pushed as build fix.
connect_compat.h | 16 ++++++++++++++++
domain_compat.h | 4 ++++
2 files changed, 20 insertions(+)
diff --git a/connect_compat.h b/connect_compat.h
index cd6d678..f780e58 100644
--- a/connect_compat.h
+++ b/connect_compat.h
@@ -243,4 +243,20 @@ int virNodeGetSEVInfoCompat(virConnectPtr conn,
int *nparams,
unsigned int flags);
+#ifndef VIR_NODE_SEV_CBITPOS
+#define VIR_NODE_SEV_CBITPOS "cbitpos"
+#endif
+
+#ifndef VIR_NODE_SEV_REDUCED_PHYS_BITS
+#define VIR_NODE_SEV_REDUCED_PHYS_BITS "reduced-phys-bits"
+#endif
+
+#ifndef VIR_NODE_SEV_PDH
+#define VIR_NODE_SEV_PDH "pdh"
+#endif
+
+#ifndef VIR_NODE_SEV_CERT_CHAIN
+#define VIR_NODE_SEV_CERT_CHAIN "cert-chain"
+#endif
+
#endif /* LIBVIRT_GO_CONNECT_COMPAT_H__ */
diff --git a/domain_compat.h b/domain_compat.h
index 5c93ef5..345505c 100644
--- a/domain_compat.h
+++ b/domain_compat.h
@@ -1042,4 +1042,8 @@ int virDomainGetLaunchSecurityInfoCompat(virDomainPtr domain,
int *nparams,
unsigned int flags);
+#ifndef VIR_DOMAIN_LAUNCH_SECURITY_SEV_MEASUREMENT
+#define VIR_DOMAIN_LAUNCH_SECURITY_SEV_MEASUREMENT "sev-measurement"
+#endif
+
#endif /* LIBVIRT_GO_DOMAIN_COMPAT_H__ */
--
2.17.0