Re: [PATCH iproute2] iproute: build more easily on Android
From: Lorenzo Colitti <hidden>
Date: 2017-10-03 16:35:54
On Tue, Oct 3, 2017 at 5:23 AM, enh [off-list ref] wrote:
quoted
Rather than moving everything, why not make kernel headers directory configurable as part of the configure script setup process.the problem is that C libraries with their our own uapi headers still need your app-specific headers. to build iproute2 we need to put iproute2's include/ on our include path, but then the fact that your different uapi headers are *under* that directory causes the conflict.
Right - when building iproute2 we must have .../iproute2/include in the include paths. So when, say, ip/link_iptnl.c does #include <linux/in.h>, that file is in two places in the path - the C library includes and the iproute includes, and those two files conflict with each other. There's no way to tell the compiler "use external/iproute2/include but not external/iproute2/include/linux". But if the iproute2 files are in uapi/ , then a simple #include <linux/in.h> won't find the UAPI copy and the files won't conflict.