Skip to contentSkip to conversation

oslib-win32: Change return type of function getpagesize

PATCH New Stefan Weil 1 participant 1 message Nov 14, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 oslib-win32: Change return type of function getpagesize

getpagesize on Linux returns an int. Fix QEMU's implementation for Windows to return an int (instead of size_t), too.

This fixes a compiler warning which was introduced recently (commit 093e3c42).

---

Peter, do you need a pull request for this fix or can you apply it directly?

Thanks,
Stefan

 include/sysemu/os-win32.h | 2 +-
 util/oslib-win32.c        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/sysemu/os-win32.h +1 -1
index 13dcef6..400e098 100644
@@ -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
util/oslib-win32.c +1 -1
index 09f9e98..6a47019 100644
@@ -454,7 +454,7 @@ gint g_poll(GPollFD *fds, guint nfds, gint timeout)
     return retval;
 }
 
-size_t getpagesize(void)
+int getpagesize(void)
 {
     SYSTEM_INFO system_info;
 
Signature · 1 line
2.1.4