re-add getpagesize fallback, needed for Android
This commit is contained in:
parent
0974d6f011
commit
8b80bcdad8
@ -1,12 +1,18 @@
|
|||||||
/* $OpenBSD$ */
|
/* $OpenBSD$ */
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
getpagesize(void)
|
getpagesize(void) {
|
||||||
{
|
#ifdef _MSC_VER
|
||||||
SYSTEM_INFO system_info;
|
SYSTEM_INFO system_info;
|
||||||
GetSystemInfo(&system_info);
|
GetSystemInfo(&system_info);
|
||||||
return system_info.dwPageSize;
|
return system_info.dwPageSize;
|
||||||
|
#else
|
||||||
|
return sysconf(_SC_PAGESIZE);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user