mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +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
|
# else
|
||||||
/* Define no-op replacements that don't drag in any link dependencies. */
|
/* Define no-op replacements that don't drag in any link dependencies. */
|
||||||
# define networkAllocateActualDevice(iface) 0
|
# define networkAllocateActualDevice(iface) 0
|
||||||
# define networkNotifyActualDevice(iface) 0
|
# define networkNotifyActualDevice(iface) (iface=iface, 0)
|
||||||
# define networkReleaseActualDevice(iface) 0
|
# define networkReleaseActualDevice(iface) (iface=iface, 0)
|
||||||
# define networkGetNetworkAddress(netname, netaddr) (-2)
|
# define networkGetNetworkAddress(netname, netaddr) (-2)
|
||||||
# define networkBuildDhcpDaemonCommandLine(network, cmdout, pidfile, dctx) 0
|
# define networkBuildDhcpDaemonCommandLine(network, cmdout, pidfile, dctx) 0
|
||||||
# endif
|
# endif
|
||||||
|
@ -65,7 +65,10 @@ mymain(void)
|
|||||||
virDriverModuleInitialize(abs_builddir "/../src/.libs");
|
virDriverModuleInitialize(abs_builddir "/../src/.libs");
|
||||||
|
|
||||||
#ifdef WITH_NETWORK
|
#ifdef WITH_NETWORK
|
||||||
|
# define USE_NETWORK "network"
|
||||||
TEST("network", NULL);
|
TEST("network", NULL);
|
||||||
|
#else
|
||||||
|
# define USE_NETWORK NULL
|
||||||
#endif
|
#endif
|
||||||
#ifdef WITH_STORAGE
|
#ifdef WITH_STORAGE
|
||||||
TEST("storage", NULL);
|
TEST("storage", NULL);
|
||||||
@ -83,10 +86,10 @@ mymain(void)
|
|||||||
TEST("interface", NULL);
|
TEST("interface", NULL);
|
||||||
#endif
|
#endif
|
||||||
#ifdef WITH_QEMU
|
#ifdef WITH_QEMU
|
||||||
TEST("qemu", "network");
|
TEST("qemu", USE_NETWORK);
|
||||||
#endif
|
#endif
|
||||||
#ifdef WITH_LXC
|
#ifdef WITH_LXC
|
||||||
TEST("lxc", "network");
|
TEST("lxc", USE_NETWORK);
|
||||||
#endif
|
#endif
|
||||||
#ifdef WITH_UML
|
#ifdef WITH_UML
|
||||||
TEST("uml", NULL);
|
TEST("uml", NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user