]> git.proxmox.com Git - qemu.git/commitdiff
exec: Fix broken build for MinGW (regression)
authorStefan Weil <sw@weilnetz.de>
Wed, 18 Sep 2013 05:48:15 +0000 (07:48 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 20 Sep 2013 16:13:09 +0000 (20:13 +0400)
Commit 3435f39513a104294b5e3bbf3612047028d25cfc 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>
exec.c

diff --git a/exec.c b/exec.c
index 26469120d949e68473f07cdd9185b02d78594fd0..efeca147e77873e3f4c227332a28b11516247637 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -1229,9 +1229,11 @@ void qemu_ram_free(ram_addr_t addr)
                 ;
             } else if (xen_enabled()) {
                 xen_invalidate_map_cache_entry(block->host);
+#ifndef _WIN32
             } else if (block->fd >= 0) {
                 munmap(block->host, block->length);
                 close(block->fd);
+#endif
             } else {
                 qemu_anon_ram_free(block->host, block->length);
             }