Commit a3700b9b authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa Committed by Commit Bot

get_uintptr: IWYU for uintptr_t's definition

Per the C++ standard, uintptr_t comes from <stdint.h>, so include it rather
than relying on the header coming in implicitly.

This fixes base_unittests's build with libstdc++, which was failing with
errors such as

In file included from ../../base/containers/vector_buffer.h:14,
                 from ../../base/containers/vector_buffer_unittest.cc:5:
../../base/containers/util.h:13:15: error: ‘uintptr_t’ does not name a type; did you mean ‘u_int64_t’?
 static inline uintptr_t get_uintptr(const T* t) {
               ^~~~~~~~~
               u_int64_t

Bug: 819294
Change-Id: I68e8d5aac3918044a39b6f16fda4800a18ce74a6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1505554
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638088}
parent efdff321
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
#ifndef BASE_CONTAINERS_UTIL_H_ #ifndef BASE_CONTAINERS_UTIL_H_
#define BASE_CONTAINERS_UTIL_H_ #define BASE_CONTAINERS_UTIL_H_
#include <stdint.h>
namespace base { namespace base {
// TODO(crbug.com/817982): What we really need is for checked_math.h to be // TODO(crbug.com/817982): What we really need is for checked_math.h to be
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment