aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libspl/include/sys
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libspl/include/sys')
-rw-r--r--lib/libspl/include/sys/param.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libspl/include/sys/param.h b/lib/libspl/include/sys/param.h
index 9f362dd8b..c22d508f9 100644
--- a/lib/libspl/include/sys/param.h
+++ b/lib/libspl/include/sys/param.h
@@ -57,8 +57,11 @@
#define MAXUID UINT32_MAX /* max user id */
#define MAXPROJID MAXUID /* max project id */
-#ifndef PAGESIZE
-#define PAGESIZE (sysconf(_SC_PAGESIZE))
+#ifdef PAGESIZE
+#undef PAGESIZE
#endif /* PAGESIZE */
+extern size_t spl_pagesize(void);
+#define PAGESIZE (spl_pagesize())
+
#endif