From 4870f9e8f33251bead63230a6917c8ddce37eae2 Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 9 May 2016 18:18:28 +0200 Subject: [PATCH] Fix for IPv6 compilation and linkage errors Two errors have been spotted, when IPv6 is enabled in the ravenusb Project-Makefile: #CONTIKI_NO_NET=1 CONTIKI_WITH_IPV6=1 The compile error results from a variable name mismatch in cdc_task.c The variable 'r' is undeclared and should be renamed to 'route' The linker also fails with 'undefined references' This has been mediated by adding 'core/net' to Modules in the Project-Makefile. --- examples/ravenusbstick/Makefile.ravenusbstick | 2 +- platform/avr-ravenusb/cdc_task.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/ravenusbstick/Makefile.ravenusbstick b/examples/ravenusbstick/Makefile.ravenusbstick index d00ba6cba..27b244b11 100644 --- a/examples/ravenusbstick/Makefile.ravenusbstick +++ b/examples/ravenusbstick/Makefile.ravenusbstick @@ -8,7 +8,7 @@ CONTIKI_WITH_IPV6=0 CONTIKI = ../.. -MODULES+=core/net/mac/sicslowmac core/net/mac core/net/llsec +MODULES+=core/net/mac/sicslowmac core/net core/net/mac core/net/llsec PROJECT_SOURCEFILES += fakeuip.c diff --git a/platform/avr-ravenusb/cdc_task.c b/platform/avr-ravenusb/cdc_task.c index 8caabc772..de30d8d65 100644 --- a/platform/avr-ravenusb/cdc_task.c +++ b/platform/avr-ravenusb/cdc_task.c @@ -611,7 +611,7 @@ extern uip_ds6_netif_t uip_ds6_if; uip_ds6_route_t *route; for(route = uip_ds6_route_head(); route != NULL; - route = uip_ds6_route_next(r)) { + route = uip_ds6_route_next(route)) { ipaddr_add(&route->ipaddr); PRINTF_P(PSTR("/%u (via "), route->length); ipaddr_add(uip_ds6_route_nexthop(route));