summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/Makefile.am12
-rw-r--r--server/reds.c8
2 files changed, 17 insertions, 3 deletions
diff --git a/server/Makefile.am b/server/Makefile.am
index 0fe1c0e6..d09e2d20 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -50,6 +50,15 @@ libspice_server_la_LIBADD = \
$(LIBRT) \
$(NULL)
+if SUPPORT_TUNNEL
+ TUNNEL_SRCS = \
+ red_tunnel_worker.c \
+ red_tunnel_worker.h \
+ $(NULL)
+else
+ TUNNEL_SRCS =
+endif
+
libspice_server_la_SOURCES = \
glz_encoder.c \
glz_encoder_config.h \
@@ -73,10 +82,9 @@ libspice_server_la_SOURCES = \
snd_worker.h \
red_channel.h \
red_channel.c \
- red_tunnel_worker.c \
- red_tunnel_worker.h \
spice.h \
vd_interface.h \
+ $(TUNNEL_SRCS) \
$(COMMON_SRCS) \
$(NULL)
diff --git a/server/reds.c b/server/reds.c
index ef088f0d..675db619 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -46,11 +46,13 @@
#include "red_common.h"
#include "red_dispatcher.h"
#include "snd_worker.h"
-#include "red_tunnel_worker.h"
#include <spice/stats.h>
#include "stat.h"
#include "ring.h"
#include "config.h"
+#ifdef HAVE_SLIRP
+#include "red_tunnel_worker.h"
+#endif
CoreInterface *core = NULL;
static MigrationInterface *mig = NULL;
@@ -5162,6 +5164,7 @@ static void interface_change_notifier(void *opaque, VDInterface *interface,
}
attach_to_red_agent((VDIPortInterface *)interface);
} else if (strcmp(interface->type, VD_INTERFACE_NET_WIRE) == 0) {
+#ifdef HAVE_SLIRP
NetWireInterface * net_wire = (NetWireInterface *)interface;
red_printf("VD_INTERFACE_NET_WIRE");
if (red_tunnel) {
@@ -5174,6 +5177,9 @@ static void interface_change_notifier(void *opaque, VDInterface *interface,
return;
}
red_tunnel = red_tunnel_attach(core, net_wire);
+#else
+ red_printf("unsupported net wire interface");
+#endif
}
break;
case VD_INTERFACE_REMOVING: