* [Qemu-trivial] [PATCH] exec: Fix broken build for MinGW (regression)
@ 2013-09-18 5:48 ` Stefan Weil
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Weil @ 2013-09-18 5:48 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Stefan Weil, Markus Armbruster
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>
---
exec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/exec.c b/exec.c
index 2646912..efeca14 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);
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH] exec: Fix broken build for MinGW (regression)
@ 2013-09-18 5:48 ` Stefan Weil
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Weil @ 2013-09-18 5:48 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Stefan Weil, Markus Armbruster
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>
---
exec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/exec.c b/exec.c
index 2646912..efeca14 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);
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-trivial] [PATCH] exec: Fix broken build for MinGW (regression)
2013-09-18 5:48 ` [Qemu-devel] " Stefan Weil
@ 2013-09-18 6:43 ` Markus Armbruster
-1 siblings, 0 replies; 6+ messages in thread
From: Markus Armbruster @ 2013-09-18 6:43 UTC (permalink / raw)
To: Stefan Weil; +Cc: qemu-trivial, qemu-devel
Stefan Weil <sw@weilnetz.de> writes:
> 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>
> ---
> exec.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/exec.c b/exec.c
> index 2646912..efeca14 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);
> }
The initial mmap() is under #ifdef __linux__, in file_ram_alloc().
However, the code manipulating it in qemu_ram_remap() is under #ifndef
_WIN32, and your patch matches that. Makes sense.
Thanks for cleaning up after me ;)
Reviewed-by: Markus Armbruster <armbru@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] exec: Fix broken build for MinGW (regression)
@ 2013-09-18 6:43 ` Markus Armbruster
0 siblings, 0 replies; 6+ messages in thread
From: Markus Armbruster @ 2013-09-18 6:43 UTC (permalink / raw)
To: Stefan Weil; +Cc: qemu-trivial, qemu-devel
Stefan Weil <sw@weilnetz.de> writes:
> 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>
> ---
> exec.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/exec.c b/exec.c
> index 2646912..efeca14 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);
> }
The initial mmap() is under #ifdef __linux__, in file_ram_alloc().
However, the code manipulating it in qemu_ram_remap() is under #ifndef
_WIN32, and your patch matches that. Makes sense.
Thanks for cleaning up after me ;)
Reviewed-by: Markus Armbruster <armbru@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-trivial] [PATCH] exec: Fix broken build for MinGW (regression)
2013-09-18 5:48 ` [Qemu-devel] " Stefan Weil
@ 2013-09-20 16:13 ` Michael Tokarev
-1 siblings, 0 replies; 6+ messages in thread
From: Michael Tokarev @ 2013-09-20 16:13 UTC (permalink / raw)
To: Stefan Weil; +Cc: qemu-trivial, qemu-devel, Markus Armbruster
18.09.2013 09:48, Stefan Weil wrote:
> 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.
Thanks, applied to the trivial patches queue.
/mjt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH] exec: Fix broken build for MinGW (regression)
@ 2013-09-20 16:13 ` Michael Tokarev
0 siblings, 0 replies; 6+ messages in thread
From: Michael Tokarev @ 2013-09-20 16:13 UTC (permalink / raw)
To: Stefan Weil; +Cc: qemu-trivial, qemu-devel, Markus Armbruster
18.09.2013 09:48, Stefan Weil wrote:
> 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.
Thanks, applied to the trivial patches queue.
/mjt
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-09-20 16:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-18 5:48 [Qemu-trivial] [PATCH] exec: Fix broken build for MinGW (regression) Stefan Weil
2013-09-18 5:48 ` [Qemu-devel] " Stefan Weil
2013-09-18 6:43 ` [Qemu-trivial] " Markus Armbruster
2013-09-18 6:43 ` [Qemu-devel] " Markus Armbruster
2013-09-20 16:13 ` [Qemu-trivial] " Michael Tokarev
2013-09-20 16:13 ` [Qemu-devel] " Michael Tokarev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.