A cross-compile to mingw failed:

  CC       virsystemdmock_la-virsystemdmock.lo
../../tests/virsystemdmock.c:29:6: error: 'dbus_connection_set_change_sigpipe' 
redeclared without dllimport attribute: previous dllimport ignored 
[-Werror=attributes]
 void dbus_connection_set_change_sigpipe(dbus_bool_t will_modify_sigpipe 
ATTRIBUTE_UNUSED)
      ^

But when you think about it, systemd is Linux-only, and even our
use of LD_PRELOAD to provide mock syscalls is Linux-only.

* tests/virsystemdmock.c: Avoid compilation outside Linux.

Signed-off-by: Eric Blake <ebl...@redhat.com>
---

Another build-breaker push.

 tests/virsystemdmock.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/tests/virsystemdmock.c b/tests/virsystemdmock.c
index 1f4413c..b6c3695 100644
--- a/tests/virsystemdmock.c
+++ b/tests/virsystemdmock.c
@@ -20,11 +20,12 @@

 #include <config.h>

-#include "internal.h"
+#ifdef __linux__
+# include "internal.h"

-#include <stdlib.h>
+# include <stdlib.h>

-#include <dbus/dbus.h>
+# include <dbus/dbus.h>

 void dbus_connection_set_change_sigpipe(dbus_bool_t will_modify_sigpipe 
ATTRIBUTE_UNUSED)
 {
@@ -79,3 +80,7 @@ DBusMessage 
*dbus_connection_send_with_reply_and_block(DBusConnection *connectio

     return reply;
 }
+
+#else
+/* Nothing to override on non-__linux__ platforms */
+#endif
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to