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)
This commit is contained in:
Patrick Quist 2024-09-28 15:11:24 +02:00 committed by GitHub
parent 54a3e6fdf7
commit 776027d1f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;