0

Include a smaller UNIX header in build/build_config.h.

Include assert.h instead of unistd.h to drag in features.h. This is
still sufficient to detect uClibc. Then do IWYU for unistd.h to fix the
build.

Change-Id: I9001658bbd0b48996afcabfc07c6a88c99257e47
Cq-Include-Trybots: luci.chrome.try:linux-chromeos-chrome,linux-chrome,mac-chrome,lacros-amd64-generic-chrome,chromeos-eve-chrome
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3325026
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Mostyn Bramley-Moore <mostynb@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#950791}
This commit is contained in:
Lei Zhang
2021-12-11 15:10:54 +00:00
committed by Chromium LUCI CQ
parent 6ea523b52c
commit 76a0ca2e3c
8 changed files with 11 additions and 1 deletions

@ -60,7 +60,7 @@
#define OS_LINUX 1
#endif // !defined(OS_CHROMEOS)
// Include a system header to pull in features.h for glibc/uclibc macros.
#include <unistd.h>
#include <assert.h>
#if defined(__GLIBC__) && !defined(__UCLIBC__)
// We really are using glibc, not uClibc pretending to be glibc.
#define LIBC_GLIBC 1

@ -4,6 +4,8 @@
#include "device/gamepad/hid_writer_linux.h"
#include <unistd.h>
#include "base/posix/eintr_wrapper.h"
namespace device {

@ -5,6 +5,7 @@
#include "pdf/font_table_linux.h"
#include <sys/stat.h>
#include <unistd.h>
#include <algorithm>
#include <limits>

@ -11,6 +11,8 @@
#if defined(OS_LINUX) || defined(OS_CHROMEOS)
#include <drm_fourcc.h>
#include <unistd.h>
#include "base/posix/eintr_wrapper.h"
#endif

@ -1311,6 +1311,7 @@ class GenXproto(FileWriter):
self.write_header()
self.write('#include "%s.h"' % self.module.namespace.header)
self.write()
self.write('#include <unistd.h>')
self.write('#include <xcb/xcb.h>')
self.write('#include <xcb/xcbext.h>')
self.write()

@ -40,6 +40,7 @@
#include "dri3.h"
#include <unistd.h>
#include <xcb/xcb.h>
#include <xcb/xcbext.h>

@ -40,6 +40,7 @@
#include "shm.h"
#include <unistd.h>
#include <xcb/xcb.h>
#include <xcb/xcbext.h>

@ -4,6 +4,8 @@
#include "ui/gl/gl_image_glx_native_pixmap.h"
#include <unistd.h>
#include "base/posix/eintr_wrapper.h"
#include "ui/gfx/buffer_types.h"
#include "ui/gfx/linux/native_pixmap_dmabuf.h"