aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-rw-r--r--backends/dbus-vmstate.c2
-rw-r--r--backends/meson.build10
-rw-r--r--backends/tpm/tpm_emulator.c2
3 files changed, 9 insertions, 5 deletions
diff --git a/backends/dbus-vmstate.c b/backends/dbus-vmstate.c
index a9d8cb0acd..be6c4d8e0a 100644
--- a/backends/dbus-vmstate.c
+++ b/backends/dbus-vmstate.c
@@ -393,7 +393,7 @@ static const VMStateDescription dbus_vmstate = {
.version_id = 0,
.pre_save = dbus_vmstate_pre_save,
.post_load = dbus_vmstate_post_load,
- .fields = (VMStateField[]) {
+ .fields = (const VMStateField[]) {
VMSTATE_UINT32(data_size, DBusVMState),
VMSTATE_VBUFFER_ALLOC_UINT32(data, DBusVMState, 0, 0, data_size),
VMSTATE_END_OF_LIST()
diff --git a/backends/meson.build b/backends/meson.build
index 9a5cea480d..8b2b111497 100644
--- a/backends/meson.build
+++ b/backends/meson.build
@@ -10,9 +10,13 @@ system_ss.add([files(
'confidential-guest-support.c',
), numa])
-system_ss.add(when: 'CONFIG_POSIX', if_true: files('rng-random.c'))
-system_ss.add(when: 'CONFIG_POSIX', if_true: files('hostmem-file.c'))
-system_ss.add(when: 'CONFIG_LINUX', if_true: files('hostmem-memfd.c'))
+if host_os != 'windows'
+ system_ss.add(files('rng-random.c'))
+ system_ss.add(files('hostmem-file.c'))
+endif
+if host_os == 'linux'
+ system_ss.add(files('hostmem-memfd.c'))
+endif
if keyutils.found()
system_ss.add(keyutils, files('cryptodev-lkcf.c'))
endif
diff --git a/backends/tpm/tpm_emulator.c b/backends/tpm/tpm_emulator.c
index 254fce7764..5a8fba9bde 100644
--- a/backends/tpm/tpm_emulator.c
+++ b/backends/tpm/tpm_emulator.c
@@ -939,7 +939,7 @@ static const VMStateDescription vmstate_tpm_emulator = {
.version_id = 0,
.pre_save = tpm_emulator_pre_save,
.post_load = tpm_emulator_post_load,
- .fields = (VMStateField[]) {
+ .fields = (const VMStateField[]) {
VMSTATE_UINT32(state_blobs.permanent_flags, TPMEmulator),
VMSTATE_UINT32(state_blobs.permanent.size, TPMEmulator),
VMSTATE_VBUFFER_ALLOC_UINT32(state_blobs.permanent.buffer,