Commit: 520bf84bea2ef0abd474da1875bee23500dfbba2
Parent: ace5c0cb90b3063458d5fd04812e0276bb2f7f1a
Author: opask
Date: Sat, 6 Oct 2018 11:03:17 -0600
cache.c: replace obsolete getpagesize() with sysconf(_SC_PAGESIZE)
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/cache.c b/cache.c
@@ -5,6 +5,7 @@
#include <errno.h>
#include <search.h>
+#include <unistd.h>
#include "links.h"
static struct list_head cache = {&cache, &cache};
@@ -541,7 +542,7 @@ ret:
void init_cache(void)
{
int getpg;
- EINTRLOOP(getpg, getpagesize());
+ EINTRLOOP(getpg, sysconf(_SC_PAGESIZE));
if (getpg > 0 && getpg < 0x10000 && !(getpg & (getpg - 1)))
page_size = getpg;
register_cache_upcall(shrink_file_cache, 0, cast_uchar "file");