提交 524f52c3 编写于 作者: E Eric Blake

build: skip systemd mock on non-Linux

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: NEric Blake <eblake@redhat.com>
上级 63d261f3
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册