exec: Fix broken build for MinGW (regression)

Commit 3435f39513 reduced the ifdeffery with
this result for MinGW:

exec.c: In function ‘qemu_ram_free’:
exec.c:1239:17: warning:
 implicit declaration of function ‘munmap’ [-Wimplicit-function-declaration]
exec.c:1239:17: warning:
 nested extern declaration of ‘munmap’ [-Wnested-externs]
exec.c:1239: undefined reference to `munmap'

Add some ifdeffery again to fix this.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
Stefan Weil 2013-09-18 07:48:15 +02:00 committed by Michael Tokarev
parent e76d05c2b5
commit 089f3f761e

2
exec.c
View File

@ -1229,9 +1229,11 @@ void qemu_ram_free(ram_addr_t addr)
; ;
} else if (xen_enabled()) { } else if (xen_enabled()) {
xen_invalidate_map_cache_entry(block->host); xen_invalidate_map_cache_entry(block->host);
#ifndef _WIN32
} else if (block->fd >= 0) { } else if (block->fd >= 0) {
munmap(block->host, block->length); munmap(block->host, block->length);
close(block->fd); close(block->fd);
#endif
} else { } else {
qemu_anon_ram_free(block->host, block->length); qemu_anon_ram_free(block->host, block->length);
} }