Commit 07271aea authored by Piotr Tworek's avatar Piotr Tworek Committed by Commit Bot

Fix partition_alloc build issues with libstdc++.

Two minor and pretty generic issues are exposed when building the code
with libstdc++ instead of bundled libcxx.

1. Code in thread_cache.h uses std::atomic but fails to include required
   header file.
2. Code in partition_alloc_constants.h uses std::max_align_t which is
   defined in cstddef, not its C version stddef.h.

In both cases libcxx basically pulls in required headers indirectly.

Bug: 957519
Change-Id: Idcee3e7abfab94cb40e1b95c636b97cf9c766b75
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2440436Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Piotr Tworek <ptworek@vewd.com>
Cr-Commit-Position: refs/heads/master@{#812598}
parent 11c5c16b
......@@ -6,7 +6,7 @@
#define BASE_ALLOCATOR_PARTITION_ALLOCATOR_PARTITION_ALLOC_CONSTANTS_H_
#include <limits.h>
#include <stddef.h>
#include <cstddef>
#include <algorithm>
......
......@@ -5,6 +5,7 @@
#ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_THREAD_CACHE_H_
#define BASE_ALLOCATOR_PARTITION_ALLOCATOR_THREAD_CACHE_H_
#include <atomic>
#include <cstdint>
#include <memory>
......
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