[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 1/3] update-linux-headers: Include const.h

From: Eric Farman
Subject: Re: [PATCH v3 1/3] update-linux-headers: Include const.h
Date: Thu, 7 Jan 2021 12:50:34 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0

On 1/7/21 12:05 PM, Peter Maydell wrote:
On Thu, 7 Jan 2021 at 16:52, Eric Farman <farman@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.

Ah, today I learned.  Thanks, Peter.

 - Eric

-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]