]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
build: work around mingw header pollution
authorEric Blake <eblake@redhat.com>
Tue, 2 Jul 2013 12:09:30 +0000 (06:09 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 2 Jul 2013 12:25:50 +0000 (06:25 -0600)
commit1528e8b23a0c0014074b06772368e00a17020a79
tree7ebccab1f7e28060a05b6369ae2c76ae6b507cc0
parentbc09c5d3355483bbf4cec55ca82689ae67af6d44
build: work around mingw header pollution

On Fedora 18, when cross-compiling to mingw with the mingw*-dbus
packages installed, compilation fails with:

  CC       libvirt_net_rpc_server_la-virnetserver.lo
In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/dbus-1.0/dbus/dbus-connection.h:32:0,
                 from /usr/i686-w64-mingw32/sys-root/mingw/include/dbus-1.0/dbus/dbus-bus.h:30,
                 from /usr/i686-w64-mingw32/sys-root/mingw/include/dbus-1.0/dbus/dbus.h:31,
                 from ../../src/util/virdbus.h:26,
                 from ../../src/rpc/virnetserver.c:39:
/usr/i686-w64-mingw32/sys-root/mingw/include/dbus-1.0/dbus/dbus-message.h:74:58: error: expected ';', ',' or ')' before 'struct'

I have reported this as a bug against two packages:
- mingw-headers, for polluting the namespace
https://bugzilla.redhat.com/show_bug.cgi?id=980270
- dbus, for not dealing with the pollution
https://bugzilla.redhat.com/show_bug.cgi?id=980278

At least dbus has agreed that a future version of dbus headers will
do s/interface/iface/, regardless of what happens in mingw. But it
is also easy to workaround in libvirt in the meantime, without having
to wait for either mingw or dbus to upgrade.

* src/util/virdbus.h (includes): Undo mingw's pollution so that
dbus doesn't fail.

Signed-off-by: Eric Blake <eblake@redhat.com>
src/util/virdbus.h