mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
build: fix build --without-network
bridge_driver.h: silence gcc warnings: statement with no effect [-Wunused-value] unused variable 'net' [-Wunused-variable] virdrivermoduletest.c: don't require network driver module if it hasn't been built.
This commit is contained in:
parent
a703566201
commit
5efacd7813
@ -53,8 +53,8 @@ int networkBuildDhcpDaemonCommandLine(virNetworkObjPtr network,
|
||||
# else
|
||||
/* Define no-op replacements that don't drag in any link dependencies. */
|
||||
# define networkAllocateActualDevice(iface) 0
|
||||
# define networkNotifyActualDevice(iface) 0
|
||||
# define networkReleaseActualDevice(iface) 0
|
||||
# define networkNotifyActualDevice(iface) (iface=iface, 0)
|
||||
# define networkReleaseActualDevice(iface) (iface=iface, 0)
|
||||
# define networkGetNetworkAddress(netname, netaddr) (-2)
|
||||
# define networkBuildDhcpDaemonCommandLine(network, cmdout, pidfile, dctx) 0
|
||||
# endif
|
||||
|
@ -65,7 +65,10 @@ mymain(void)
|
||||
virDriverModuleInitialize(abs_builddir "/../src/.libs");
|
||||
|
||||
#ifdef WITH_NETWORK
|
||||
# define USE_NETWORK "network"
|
||||
TEST("network", NULL);
|
||||
#else
|
||||
# define USE_NETWORK NULL
|
||||
#endif
|
||||
#ifdef WITH_STORAGE
|
||||
TEST("storage", NULL);
|
||||
@ -83,10 +86,10 @@ mymain(void)
|
||||
TEST("interface", NULL);
|
||||
#endif
|
||||
#ifdef WITH_QEMU
|
||||
TEST("qemu", "network");
|
||||
TEST("qemu", USE_NETWORK);
|
||||
#endif
|
||||
#ifdef WITH_LXC
|
||||
TEST("lxc", "network");
|
||||
TEST("lxc", USE_NETWORK);
|
||||
#endif
|
||||
#ifdef WITH_UML
|
||||
TEST("uml", NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user