On Thu, 7 Jan 2021 at 16:52, Eric Farman <far...@linux.ibm.com> wrote: > On 1/6/21 2:03 PM, Peter Xu wrote: > > Could I ask why the const.h is installed into include/standard-headers/linux > > rather than linux-headers/linux? When I was working on my version I failed > > to > > figure out the difference. > > Considering the main difference is whether the header file is copied > directly or edited with a bunch of substitutions, and const.h doesn't > get modified by those substitutions, I suppose it could go in > linux-headers itself.
No, it can't, because linux-headers/ only goes on the include path when on a Linux host and on a CPU architecture with KVM support, whereas include/standard-headers/ headers are available and used on all host OSes/architectures. Because include/standard-headers/linux/ethtool.h will end up with a line #include "standard-headers/linux/const.h" we need to provide a const.h in that location so that the #include pulls in the file correctly. thanks -- PMM