diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-11 22:06:42 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-11 22:06:42 +0000 |
commit | 4448e78979a41b35d416bacc731e2151e2a39972 (patch) | |
tree | 1b43a549fce56e08c57b32cceb91aa6db704860b /exec.c | |
parent | c57ea6e01b4fea006536c48172cb9260735636f9 (diff) | |
download | qemu-4448e78979a41b35d416bacc731e2151e2a39972.tar.gz qemu-4448e78979a41b35d416bacc731e2151e2a39972.tar.bz2 qemu-4448e78979a41b35d416bacc731e2151e2a39972.zip |
Fix -linux-user build by reverting r5701
Unfortunately, -linux-user doesn't use osdep as it replaces some of those
functions with specific ones. The code #ifdef code in exec.c needs to
remain in place so instead of introducing a qemu_getpagesize() let's just
use getpagesize() in the non-Windows implementation of qemu_vmalloc.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5703 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -231,7 +231,16 @@ static void page_init(void) { /* NOTE: we can always suppose that qemu_host_page_size >= TARGET_PAGE_SIZE */ - qemu_real_host_page_size = qemu_getpagesize(); +#ifdef _WIN32 + { + SYSTEM_INFO system_info; + + GetSystemInfo(&system_info); + qemu_real_host_page_size = system_info.dwPageSize; + } +#else + qemu_real_host_page_size = getpagesize(); +#endif if (qemu_host_page_size == 0) qemu_host_page_size = qemu_real_host_page_size; if (qemu_host_page_size < TARGET_PAGE_SIZE) |