chiark / gitweb /
Fix up more warnings. Actually read from connections
[inn-innduct.git] / lib / getpagesize.c
1 /*  $Id: getpagesize.c 5596 2002-08-17 21:29:35Z rra $
2 **
3 **  Replacement for a missing getpagesize.
4 **
5 **  Provides getpagesize implemented in terms of sysconf for those systems
6 **  that don't have the getpagesize function.  Defaults to a page size of 16KB
7 **  if sysconf isn't available either.
8 */
9
10 #include "config.h"
11 #include <unistd.h>
12
13 int
14 getpagesize(void)
15 {
16     int pagesize;
17
18 #ifdef _SC_PAGESIZE
19     pagesize = sysconf(_SC_PAGESIZE);
20 #else
21     pagesize = 16 * 1024;
22 #endif
23     return pagesize;
24 }