diff options
Diffstat (limited to 'absl/debugging/internal/stack_consumption.cc')
-rw-r--r-- | absl/debugging/internal/stack_consumption.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/absl/debugging/internal/stack_consumption.cc b/absl/debugging/internal/stack_consumption.cc index 51348649..3f40beac 100644 --- a/absl/debugging/internal/stack_consumption.cc +++ b/absl/debugging/internal/stack_consumption.cc @@ -18,14 +18,17 @@ #ifdef ABSL_INTERNAL_HAVE_DEBUGGING_STACK_CONSUMPTION #include <signal.h> +#include <string.h> #include <sys/mman.h> #include <unistd.h> -#include <string.h> - #include "absl/base/attributes.h" #include "absl/base/internal/raw_logging.h" +#if defined(MAP_ANON) && !defined(MAP_ANONYMOUS) +#define MAP_ANONYMOUS MAP_ANON +#endif + namespace absl { ABSL_NAMESPACE_BEGIN namespace debugging_internal { @@ -162,7 +165,7 @@ int GetSignalHandlerStackConsumption(void (*signal_handler)(int)) { // versions of musl have a bug that rejects ss_size==0. Work around this by // setting ss_size to MINSIGSTKSZ, which should be ignored by the kernel // when SS_DISABLE is set. - old_sigstk.ss_size = MINSIGSTKSZ; + old_sigstk.ss_size = static_cast<size_t>(MINSIGSTKSZ); } ABSL_RAW_CHECK(sigaltstack(&old_sigstk, nullptr) == 0, "sigaltstack() failed"); |