mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
63d261f395
commit
524f52c305
@ -20,11 +20,12 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#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)
|
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;
|
return reply;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
/* Nothing to override on non-__linux__ platforms */
|
||||||
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user