From 776027d1f1b8c4f0b1e8e4e954fc245a6b6e3bd9 Mon Sep 17 00:00:00 2001 From: Patrick Quist Date: Sat, 28 Sep 2024 15:11:24 +0200 Subject: [PATCH] getpagesize() was removed from OSX PAGE_SIZE is a macro that can be used (which I'm guessing is defined to be `sysconf(_SC_PAGESIZE)` probably) --- src/from_current.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/from_current.cpp b/src/from_current.cpp index 308735f..f62d5e5 100644 --- a/src/from_current.cpp +++ b/src/from_current.cpp @@ -107,7 +107,11 @@ namespace cpptrace { } #else int get_page_size() { + #ifdef getpagesize return getpagesize(); + #else + return PAGE_SIZE; + #endif } constexpr auto memory_readonly = PROT_READ; constexpr auto memory_readwrite = PROT_READ | PROT_WRITE;