]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tests: avoid dlsym mocking on mingw
authorEric Blake <eblake@redhat.com>
Tue, 20 May 2014 21:04:44 +0000 (15:04 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 20 May 2014 21:16:22 +0000 (15:16 -0600)
commitfa8701ea2bad95111efaedf92c7af9fc53a8a8d3
tree000541ab6d67fcacecf1eeed1832331e38a59ff1
parentcb6681ff1de3d02e8d88ce3b391ba03f8dd612f4
tests: avoid dlsym mocking on mingw

I got a build failure when cross-compiling to mingw with the
mingw64-dbus package installed:

  CC       virmockdbus_la-virmockdbus.lo
../../tests/virmockdbus.c:29:6: error: 'dbus_connection_set_change_sigpipe' redeclared without dllimport attribute: previous dllimport ignored [-Werror=attributes]
 VIR_MOCK_STUB_VOID_ARGS(dbus_connection_set_change_sigpipe,
      ^
../../tests/virmockdbus.c:33:18: error: 'dbus_bus_get' redeclared without dllimport attribute: previous dllimport ignored [-Werror=attributes]
 VIR_MOCK_STUB_RET_ARGS(dbus_bus_get,
...

Well duh - mingw lacks dlopen and friends, even if it can support
dbus.  A similar failure occured in virsystemdtest.c; but in that
file, we know that systemd is a Linux-only concept.

* tests/virmockdbus.c: Cripple on mingw.
* tests/virsystemdtest.c: Cripple on non-Linux.

Signed-off-by: Eric Blake <eblake@redhat.com>
tests/virmockdbus.c
tests/virsystemdtest.c