enable a number of headers to be "compiled" standalone I.e. to enable clangd-ing them. This is just adding some missing includes that have been previously included in the whatever .h/.cc files included those headers.
diff --git a/src/check_address-inl.h b/src/check_address-inl.h index 92c1740..f2b047b 100644 --- a/src/check_address-inl.h +++ b/src/check_address-inl.h
@@ -32,9 +32,13 @@ // stacktrace_generic_fp-inl.h module. We only split this into // separate header to enable unit test coverage. +#include "config.h" + // This is only used on OS-es with mmap support. +#include <errno.h> #include <fcntl.h> #include <signal.h> +#include <stdint.h> #include <sys/mman.h> #include <unistd.h> @@ -42,6 +46,8 @@ #include <sys/syscall.h> #endif +#include "base/logging.h" + namespace { #if defined(__linux__) && !defined(FORCE_PIPES)
diff --git a/src/getpc.h b/src/getpc.h index c14c9d0..dcbbef4 100644 --- a/src/getpc.h +++ b/src/getpc.h
@@ -49,6 +49,8 @@ // REG_EIP). Note this #define must come first! #define _GNU_SOURCE 1 +#include "config.h" + #ifdef HAVE_ASM_PTRACE_H #include <asm/ptrace.h> #endif
diff --git a/src/heap-profile-stats.h b/src/heap-profile-stats.h index 1e075f7..d94afe8 100644 --- a/src/heap-profile-stats.h +++ b/src/heap-profile-stats.h
@@ -51,6 +51,8 @@ #ifndef HEAP_PROFILE_STATS_H_ #define HEAP_PROFILE_STATS_H_ +#include <stdint.h> + struct HeapProfileStats { // Returns true if the two HeapProfileStats are semantically equal. bool Equivalent(const HeapProfileStats& other) const {
diff --git a/src/libbacktrace_api.h b/src/libbacktrace_api.h index 2340a79..dde916f 100644 --- a/src/libbacktrace_api.h +++ b/src/libbacktrace_api.h
@@ -32,6 +32,7 @@ #define LIBBACKTRACE_API_H_ #include <stddef.h> +#include <stdint.h> extern "C" {
diff --git a/src/maybe_emergency_malloc.h b/src/maybe_emergency_malloc.h index bbe20f6..48d891e 100644 --- a/src/maybe_emergency_malloc.h +++ b/src/maybe_emergency_malloc.h
@@ -31,6 +31,8 @@ #ifndef MAYBE_EMERGENCY_MALLOC_H #define MAYBE_EMERGENCY_MALLOC_H +#include <stddef.h> + #ifdef ENABLE_EMERGENCY_MALLOC #include "emergency_malloc.h"