diff options
author | Ryan Schmidt <ryandesign@macports.org> | 2023-08-01 14:26:51 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-08-01 14:27:32 -0700 |
commit | 5b3b0ed81cb514540c3b9d752d9e01efb64056d2 (patch) | |
tree | 0fc9210a1816672b0902b125e8d926ffc6cb0b93 /absl/debugging/internal | |
parent | c66815ac2ee561cd97e03780c5aa2ad951fbc90f (diff) |
PR #1500: Define MAP_ANONYMOUS if not defined
Included are additional automated edits by clang-format on import.
Merge d74896699faacc4a1667603e52e72cbdc8006cf6 into 22091f4c0d6626b3ef40446ce3d4ccab19425ca3
Merging this change closes #1500
COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1500 from ryandesign:MAP_ANONYMOUS d74896699faacc4a1667603e52e72cbdc8006cf6
PiperOrigin-RevId: 552922776
Change-Id: I96a0395cb5e7156d7c7a889491c5d0b4cf755819
Diffstat (limited to 'absl/debugging/internal')
-rw-r--r-- | absl/debugging/internal/examine_stack.cc | 3 | ||||
-rw-r--r-- | absl/debugging/internal/stack_consumption.cc | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/absl/debugging/internal/examine_stack.cc b/absl/debugging/internal/examine_stack.cc index 57863228..3dd6ba1a 100644 --- a/absl/debugging/internal/examine_stack.cc +++ b/absl/debugging/internal/examine_stack.cc @@ -24,6 +24,9 @@ #ifdef ABSL_HAVE_MMAP #include <sys/mman.h> +#if defined(MAP_ANON) && !defined(MAP_ANONYMOUS) +#define MAP_ANONYMOUS MAP_ANON +#endif #endif #if defined(__linux__) || defined(__APPLE__) diff --git a/absl/debugging/internal/stack_consumption.cc b/absl/debugging/internal/stack_consumption.cc index 6d974992..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 { |