diff options
Diffstat (limited to 'absl/debugging')
-rw-r--r-- | absl/debugging/failure_signal_handler.cc | 2 | ||||
-rw-r--r-- | absl/debugging/symbolize_elf.inc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/absl/debugging/failure_signal_handler.cc b/absl/debugging/failure_signal_handler.cc index d4b957bc2e41..6cecd93f9ba1 100644 --- a/absl/debugging/failure_signal_handler.cc +++ b/absl/debugging/failure_signal_handler.cc @@ -119,7 +119,7 @@ const char* FailureSignalToString(int signo) { #ifndef _WIN32 static bool SetupAlternateStackOnce() { - const size_t page_mask = getpagesize() - 1; + const size_t page_mask = sysconf(_SC_PAGESIZE) - 1; size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask; #if defined(ADDRESS_SANITIZER) || defined(MEMORY_SANITIZER) || \ defined(THREAD_SANITIZER) diff --git a/absl/debugging/symbolize_elf.inc b/absl/debugging/symbolize_elf.inc index e21439ce3fac..b31362e6f552 100644 --- a/absl/debugging/symbolize_elf.inc +++ b/absl/debugging/symbolize_elf.inc @@ -333,7 +333,7 @@ static std::atomic<Symbolizer *> g_cached_symbolizer; } // namespace static int SymbolizerSize() { - int pagesize = getpagesize(); + int pagesize = sysconf(_SC_PAGESIZE); return ((sizeof(Symbolizer) - 1) / pagesize + 1) * pagesize; } |