diff options
| author | 2023-09-20 21:48:20 -0700 | |
|---|---|---|
| committer | 2023-09-21 04:53:37 +0000 | |
| commit | dcd62cd842ca046d0b94b0584a9c84bc6e65b235 (patch) | |
| tree | 7a760fd31ed8fc01589f78751599bdb039481156 /libs/gui/ConsumerBase.cpp | |
| parent | 748848b7fcd407c4321819c33bc9eeadf1cfee97 (diff) | |
binder_status.h: include assert.h for __assert
The binder_status.h header is defining __assert as a macro for its own
error reporting, which conflicts with glibc's unused __assert function.
Android's version of glibc 2.17's assert.h has an _ASSERT_H_DECLS guard
macro preventing redeclaration of the __assert function, so if we add
an include of assert.h in binder_status.h, the __assert function can be
declared before the identifier is shadowed by the macro, and later
assert.h inclusions won't redeclare __assert (even though they *do*
redefine assert according to the current value of NDEBUG).
Without this fix, after upgrading libc++, assert.h is incidentally
included somewhere *after* binder_status.h, and binder's __assert
macro is applied to the __assert declaration in the glibc header,
which is invalid syntax.
Bug: 175635923
Test: m art_artd_tests
Change-Id: I35c197b8d92ecad417a7e9950f51461375d3861f
Diffstat (limited to 'libs/gui/ConsumerBase.cpp')
0 files changed, 0 insertions, 0 deletions