From 9c70e0e5cca4c4a11a260f6549eaccf4d3d79c77 Mon Sep 17 00:00:00 2001 From: Robert Quattlebaum Date: Sun, 19 May 2013 17:27:30 -0700 Subject: [PATCH] native/net/tapdev: Fix for new `UIP_CONF_IPV6` handling. --- cpu/native/net/tapdev-drv.c | 2 ++ cpu/native/net/tapdev.c | 7 +++++++ cpu/native/net/tapdev6.c | 6 ++++++ platform/minimal-net/Makefile.minimal-net | 8 +------- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/cpu/native/net/tapdev-drv.c b/cpu/native/net/tapdev-drv.c index a4f50899e..8984dba01 100644 --- a/cpu/native/net/tapdev-drv.c +++ b/cpu/native/net/tapdev-drv.c @@ -31,6 +31,8 @@ */ #include "contiki-net.h" +#include "net/uip.h" +#include "net/uipopt.h" #if UIP_CONF_IPV6 #include "tapdev6.h" diff --git a/cpu/native/net/tapdev.c b/cpu/native/net/tapdev.c index 73f3da59d..8ac8e514a 100644 --- a/cpu/native/net/tapdev.c +++ b/cpu/native/net/tapdev.c @@ -33,6 +33,11 @@ * */ +#include "net/uip.h" +#include "net/uipopt.h" + +#if !UIP_CONF_IPV6 + #include #include #include @@ -198,3 +203,5 @@ tapdev_exit(void) { } /*---------------------------------------------------------------------------*/ + +#endif /* !UIP_CONF_IPV6 */ diff --git a/cpu/native/net/tapdev6.c b/cpu/native/net/tapdev6.c index 9f85c47c2..71a250792 100644 --- a/cpu/native/net/tapdev6.c +++ b/cpu/native/net/tapdev6.c @@ -33,6 +33,10 @@ * */ +#include "net/uip.h" +#include "net/uipopt.h" + +#if UIP_CONF_IPV6 #include #include @@ -413,3 +417,5 @@ tapdev_exit(void) close(fd); } /*---------------------------------------------------------------------------*/ + +#endif /* UIP_CONF_IPV6 */ diff --git a/platform/minimal-net/Makefile.minimal-net b/platform/minimal-net/Makefile.minimal-net index 91dd1aaeb..034551781 100644 --- a/platform/minimal-net/Makefile.minimal-net +++ b/platform/minimal-net/Makefile.minimal-net @@ -14,13 +14,7 @@ CONTIKI_TARGET_SOURCEFILES = contiki-main.c clock.c leds.c leds-arch.c cfs-posix ifeq ($(HOST_OS),Windows) CONTIKI_TARGET_SOURCEFILES += wpcap-drv.c wpcap.c else -CONTIKI_TARGET_SOURCEFILES += tapdev-drv.c -#math -ifneq ($(UIP_CONF_IPV6),1) -CONTIKI_TARGET_SOURCEFILES += tapdev.c -else -CONTIKI_TARGET_SOURCEFILES += tapdev6.c -endif +CONTIKI_TARGET_SOURCEFILES += tapdev-drv.c tapdev.c tapdev6.c endif CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES)