* git://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git
*/
+#include "config-host.h"
+#if defined(CONFIG_POSIX)
#include <sys/mman.h>
+#endif
#include "hw.h"
#include "qdev.h"
#include "isa.h"
/* We might not be able to get the full page, only mprotect what we actually
have mapped */
+#if defined(CONFIG_POSIX)
mprotect(a, page, PROT_NONE);
mprotect(a, page, PROT_READ|PROT_WRITE);
+#endif
cpu_physical_memory_unmap(a, page, 0, 0);
}
k->init = init_test_device;
}
-static TypeInfo testdev_info = {
+static const TypeInfo testdev_info = {
.name = TYPE_TESTDEV,
.parent = TYPE_ISA_DEVICE,
.instance_size = sizeof(struct PCTestdev),