On 8 September 2015 at 20:11, Stefan Weil <s...@weilnetz.de> wrote: > Type casts from pointers to unsigned long don't work on 64 bit Windows > because both types have different size. > > Compiler warning: > > include/standard-headers/linux/virtio_ring.h:146:23: > warning: cast from pointer to integer of different size > [-Wpointer-to-int-cast] > vr->used = (void *)(((unsigned long)&vr->avail->ring[num] + ... > ^ > > Signed-off-by: Stefan Weil <s...@weilnetz.de> > --- > > This is a modification of a Linux header file, > something we usually try to avoid. > > I did not succeed in removing this header from compilations > for Windows (which would have been the best solution).
No, this header is supposed to work everywhere (that's why it's in standard-headers/ rather than linux-headers), because virtio devices must work everywhere. We need to improve the process which creates it from the kernel header by automatedly fixing up non-portable constructs (which is handled by scripts/update-linux-headers.sh). Some extra seddery in cp_virtio() is probably required. thanks -- PMM