diff --git a/native/jni/src/suggest/policyimpl/dictionary/utils/mmapped_buffer.cpp b/native/jni/src/suggest/policyimpl/dictionary/utils/mmapped_buffer.cpp
index 28af97351da4b8e53c2d760f282f8bfa207f487d..e88d6e0a9ebc560385f2db20015e13140d682702 100644
--- a/native/jni/src/suggest/policyimpl/dictionary/utils/mmapped_buffer.cpp
+++ b/native/jni/src/suggest/policyimpl/dictionary/utils/mmapped_buffer.cpp
@@ -35,7 +35,7 @@ namespace latinime {
         AKLOGE("DICT: Can't open the source. path=%s errno=%d", path, errno);
         return MmappedBufferPtr(0);
     }
-    const int pagesize = getpagesize();
+    const int pagesize = sysconf(_SC_PAGESIZE);
     const int offset = bufferOffset % pagesize;
     int alignedOffset = bufferOffset - offset;
     int alignedSize = bufferSize + offset;