[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] MinGW build
From: |
Stefan Weil |
Subject: |
Re: [Qemu-devel] MinGW build |
Date: |
Mon, 30 Nov 2015 14:29:34 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 |
Am 30.11.2015 um 14:24 schrieb Juan Quintela:
[...]
> I lied, on win64, you also need the following one (notice that
> getpagesize on unix return int as far as I can see). And this is the
> solution that was suggested on list. Should I submit that one, or
> should we leave the warning?
>
> Thanks, Juan.
>
>
> diff --git a/include/sysemu/os-win32.h b/include/sysemu/os-win32.h
> index 13dcef6..400e098 100644
> --- a/include/sysemu/os-win32.h
> +++ b/include/sysemu/os-win32.h
> @@ -87,7 +87,7 @@ static inline void os_setup_post(void) {}
> void os_set_line_buffering(void);
> static inline void os_set_proc_name(const char *dummy) {}
>
> -size_t getpagesize(void);
> +int getpagesize(void);
>
> #if !defined(EPROTONOSUPPORT)
> # define EPROTONOSUPPORT EINVAL
> diff --git a/util/oslib-win32.c b/util/oslib-win32.c
> index 09f9e98..7aad185 100644
> --- a/util/oslib-win32.c
> +++ b/util/oslib-win32.c
> @@ -454,7 +454,7 @@ gint g_poll(GPollFD *fds, guint nfds, gint timeout)
> return retval;
> }
>
> -size_t getpagesize(void)
> +getpagesize(void)
> {
> SYSTEM_INFO system_info;
>
> @@ -465,7 +465,7 @@ size_t getpagesize(void)
> void os_mem_prealloc(int fd, char *area, size_t memory)
> {
> int i;
> - size_t pagesize = getpagesize();
> + int pagesize = getpagesize();
>
> memory = (memory + pagesize - 1) & -pagesize;
> for (i = 0; i < memory / pagesize; i++) {
Something like this one: http://patchwork.ozlabs.org/patch/549870/ ? :-)
I'd be happy if you could review all three commits in that pull request,
because nobody did so far.
Regards,
Stefan