Sam Eiderman <sam...@google.com> writes:

> Hi,
>
> I am using debian 10 container to compile qemu too.
>
> I think that what happens here is that
>
>   /usr/include/linux/swab.h
>
> Uses BITS_PER_LONG instead of __BITS_PER_LONG which is actually defined before
> in qemu at:

That is indeed the error - we are just waiting for Debian to update
linux-libc-dev with the fix to the kernel headers:

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=960271

>
>   include/qemu/bitops.h:#define BITS_PER_LONG           (sizeof (unsigned 
> long) * BITS_PER_BYTE)
>
> which injects this definition into the linux swab.h header.
>
> By changing BITS_PER_LONG to __BITS_PER_LONG in the linux headers, I managed 
> to
> successfully compile qemu.
>
> A different approach would be to move the linux header includes
> (#include <linux/cdrom.h>) in file-posix.c above all other includes - which in
> some way makes more sense (since we probaly don't want qemu defines to control
> linux headers) but it requires a more complex refactoring.


-- 
Alex Bennée

Reply via email to