On 8 February 2018 at 13:38, Marcel Apfelbaum <mar...@redhat.com> wrote: > Hi Peter, > > On 08/02/2018 14:59, Peter Maydell wrote: >> (3) Some of the new headers use kernel-internals __u32 etc types. >> This isn't portable. ('HACKING' has some suggestions for types you >> might want instead.) >> > > We do not "use" the __u32 types, we just copied a kernel file > for structures used for communication between the guest driver > and the QEMU code. We had a look on how it is done and > we use the model that adds macros __u32 -> uint32_t, > so the "__types" do not really create such problems.
If we're using kernel header files, I would recommend using the scripts/update-headers machinery for this, the way we do for other kernel headers. Among other things, the cp_portable function in that script will fix up the type names for you. thanks -- PMM