logic better

This commit is contained in:
Patrick Quist 2024-09-29 01:37:21 +02:00 committed by GitHub
parent 776027d1f1
commit b0e3c0fe15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -107,10 +107,12 @@ namespace cpptrace {
}
#else
int get_page_size() {
#ifdef getpagesize
return getpagesize();
#if defined(_SC_PAGESIZE)
return sysconf(_SC_PAGESIZE);
#elif defined(PAGE_SIZE)
return PAGE_SIZE;
#else
return PAGE_SIZE;
return getpagesize();
#endif
}
constexpr auto memory_readonly = PROT_READ;