Revision 549db5c3 hw/pc-testdev.c
b/hw/pc-testdev.c | ||
---|---|---|
35 | 35 |
* git://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git |
36 | 36 |
*/ |
37 | 37 |
|
38 |
#include "config-host.h" |
|
39 |
#if defined(CONFIG_POSIX) |
|
38 | 40 |
#include <sys/mman.h> |
41 |
#endif |
|
39 | 42 |
#include "hw.h" |
40 | 43 |
#include "qdev.h" |
41 | 44 |
#include "isa.h" |
... | ... | |
100 | 103 |
|
101 | 104 |
/* We might not be able to get the full page, only mprotect what we actually |
102 | 105 |
have mapped */ |
106 |
#if defined(CONFIG_POSIX) |
|
103 | 107 |
mprotect(a, page, PROT_NONE); |
104 | 108 |
mprotect(a, page, PROT_READ|PROT_WRITE); |
109 |
#endif |
|
105 | 110 |
cpu_physical_memory_unmap(a, page, 0, 0); |
106 | 111 |
} |
107 | 112 |
|
Also available in: Unified diff