Commit f8bf4629 authored by Nick Desaulniers's avatar Nick Desaulniers Committed by Lee Jones
Browse files

ANDROID: uapi: icmp: Bionic compat with __unused

Building CONFIG_UAPI_HEADER_TEST=y with a Bionic (Android's libc) based
sysroot produces the following warning:

In file included from <built-in>:1:
./usr/include/linux/icmp.h:100:3: warning: declaration does not declare
anything [-Wmissing-declarations]
__be16  __unused;
^~~~~~

This is because Bionic defines __unused to expand to
__attribute__((__unused__)). Bionic pre-processes kernel headers and
redefines __unused to __linux_unused.

Do so here to avoid issues that only appear for Bionic based sysroot
UAPI header tests.

Link: https://android.googlesource.com/platform/bionic/+/4ebdeebef74ffa09fe8176f73b32d5a21f4be4ae/libc/include/sys/cdefs.h#95
Link: https://android.googlesource.com/platform/bionic/+/4ebdeebef74ffa09fe8176f73b32d5a21f4be4ae/libc/kernel/tools/defaults.py#70


Bug: 190019968
Bug: 234125788
Reported-by: default avatarMatthias <Männich&lt;maennich@google.com>
Signed-off-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Change-Id: I2341953cbfce8e28b982c34df2df4b3b364d63a6
Signed-off-by: default avatarLee Jones <joneslee@google.com>
parent b428671a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment