Eduardo, Andreas,

Thanks for pointing out, we didn't know about this limitation of
qemu-common.h usage.
Include directive will be moved to corresponding .c file.

Dmitry.


On Tue, Feb 26, 2013 at 3:38 PM, Eduardo Habkost <ehabk...@redhat.com>wrote:

> On Mon, Feb 25, 2013 at 09:37:52PM +0100, Andreas Färber wrote:
> > Am 25.02.2013 21:11, schrieb Dmitry Fleytman:
> [...]
> > > diff --git a/include/net/checksum.h b/include/net/checksum.h
> > > index 3e7b93d..b1cf18a 100644
> > > --- a/include/net/checksum.h
> > > +++ b/include/net/checksum.h
> > > @@ -19,6 +19,7 @@
> > >  #define QEMU_NET_CHECKSUM_H
> > >
> > >  #include <stdint.h>
> > > +#include "qemu-common.h"
> >
> > Eduardo has worked hard to resolve circular qemu-common.h dependencies!
> > Are you sure you are not reintroducing one here?
>
> Even if there's no circular dependency yet, this makes it very easy to
> introduce circular dependencies silently if one day a header included by
> qemu-common.h ends up including checksum.h. That's why qemu-common.h
> shouldn't be included by any header file.
>
>
> > What do you actually
> > need out of it? You already have stdint.h for uint32_t, and struct iovec
> > is used as pointer so you shouldn't need its internals from
> > qemu-common.h here and can include it from checksum.c instead.
> >
> [...]
>
> --
> Eduardo
>

Reply via email to