[PATCH] Add condiitonal definition for constants

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---

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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux