On 4 January 2016 at 17:37, Eric Auger <eric.au...@linaro.org> wrote: > Hi Peter, > On 12/18/2015 03:10 PM, Peter Maydell wrote: >> Does this code compile on non-Linux hosts? (You've put it in a file >> which is built everywhere, but it's definitely semantically Linux >> specific.) > > I struggled quite a lot while cross-compiling all dependencies for W32 > (~ http://wiki.qemu.org/Hosts/W32). > > Eventually device_tree.c compiles but there is a link issue since lstat > does not seem to be available with MinGW > > But there is definitively a problem with hw/arm/sysbus-fdt.c which is > not compiling due to the inclusion of #include <linux/vfio.h> > > So thanks for raising the concern. > > With respect to read_fstree, what is your sugestion: shall I keep it in > device_tree.c while protecting it with a CONFIG_LINUX or is it better to > move it, for instance in hw/arm/sysbus-fdt.c?
I don't have a strong opinion, but I don't think this code is arm-specific, so hw/arm doesn't sound quite right. A CONFIG_LINUX ifdef might be simplest if there's no obvious other file to put this. thanks -- PMM