Skip to content

Commit

Permalink
getpagesize() was removed from OSX (and posix) (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
partouf authored Sep 30, 2024
1 parent 54a3e6f commit ce8214b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/from_current.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ namespace cpptrace {
}
#else
int get_page_size() {
return getpagesize();
#if defined(_SC_PAGESIZE)
return sysconf(_SC_PAGESIZE);
#else
return getpagesize();
#endif
}
constexpr auto memory_readonly = PROT_READ;
constexpr auto memory_readwrite = PROT_READ | PROT_WRITE;
Expand Down

0 comments on commit ce8214b

Please sign in to comment.