diff --git a/tests/virmockdbus.c b/tests/virmockdbus.c index 8a01d9d278865c6364918b5abe5fd766f08a15d8..4261e6abb4df63965378cb105c493a8ffd8e78d8 100644 --- a/tests/virmockdbus.c +++ b/tests/virmockdbus.c @@ -1,7 +1,7 @@ /* * virmockdbus.c: mocking of dbus message send/reply * - * Copyright (C) 2013 Red Hat, Inc. + * Copyright (C) 2013-2014 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -22,7 +22,7 @@ #include -#ifdef WITH_DBUS +#if defined(WITH_DBUS) && !defined(WIN32) # include "virmock.h" # include @@ -61,4 +61,4 @@ VIR_MOCK_LINK_RET_ARGS(dbus_connection_send_with_reply_and_block, int, timeout_milliseconds, DBusError *, error) -#endif /* WITH_DBUS */ +#endif /* WITH_DBUS && !WIN32 */ diff --git a/tests/virsystemdtest.c b/tests/virsystemdtest.c index 0fcd4e8447c0b50265c82ae5e79098651a63be13..8f7b47eb5a51925c79b85e042357348004a323de 100644 --- a/tests/virsystemdtest.c +++ b/tests/virsystemdtest.c @@ -22,7 +22,7 @@ #include "testutils.h" -#ifdef WITH_DBUS +#if defined(WITH_DBUS) && defined(__linux__) # include # include @@ -477,7 +477,7 @@ mymain(void) VIRT_TEST_MAIN_PRELOAD(mymain, abs_builddir "/.libs/virmockdbus.so") -#else /* ! WITH_DBUS */ +#else /* ! (WITH_DBUS && __linux__) */ int main(void) {