re-add getpagesize fallback, needed for Android

This commit is contained in:
Brent Cook 2017-06-11 11:21:34 -05:00
parent 0974d6f011
commit 8b80bcdad8

View File

@ -1,12 +1,18 @@
/* $OpenBSD$ */
#include <unistd.h>
#ifdef _MSC_VER
#include <windows.h>
#endif
int
getpagesize(void)
{
getpagesize(void) {
#ifdef _MSC_VER
SYSTEM_INFO system_info;
GetSystemInfo(&system_info);
return system_info.dwPageSize;
#else
return sysconf(_SC_PAGESIZE);
#endif
}