From 089f3f761ed99bd577661e7a6335a2529eda2ba3 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Wed, 18 Sep 2013 07:48:15 +0200 Subject: exec: Fix broken build for MinGW (regression) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Markus Armbruster Signed-off-by: Michael Tokarev --- exec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/exec.c b/exec.c index 26469120d9..efeca147e7 100644 --- 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); } -- cgit v1.2.3