summary refs log tree commit diff
path: root/compat/getpagesize.c
blob: cbaae92a616298b0abd4d72fd2dd624a412f3077 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* $OpenBSD$ */

#include <unistd.h>

#ifdef _WIN32
#include <windows.h>
#endif

int
getpagesize(void) {
#ifdef _WIN32
	SYSTEM_INFO system_info;
	GetSystemInfo(&system_info);
	return system_info.dwPageSize;
#else
	return sysconf(_SC_PAGESIZE);
#endif
}