From 83f2382791ead81b7d018a09d82f40cf4d7b49f4 Mon Sep 17 00:00:00 2001 From: Yasuyuki Tanaka Date: Wed, 18 Jan 2017 22:33:16 +0100 Subject: [PATCH] Orchestra: avoid a link error for nbr_routes --- .../orchestra-rule-unicast-per-neighbor-rpl-storing.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/orchestra/orchestra-rule-unicast-per-neighbor-rpl-storing.c b/apps/orchestra/orchestra-rule-unicast-per-neighbor-rpl-storing.c index 76e039f09..1a2c05e0e 100644 --- a/apps/orchestra/orchestra-rule-unicast-per-neighbor-rpl-storing.c +++ b/apps/orchestra/orchestra-rule-unicast-per-neighbor-rpl-storing.c @@ -45,6 +45,14 @@ #include "net/ipv6/uip-ds6-route.h" #include "net/packetbuf.h" #include "net/rpl/rpl-conf.h" +#include "net/rpl/rpl-private.h" + +/* + * The body of this rule should be compiled only when "nbr_routes" is available, + * otherwise a link error causes build failure. "nbr_routes" is compiled if + * UIP_CONF_MAX_ROUTES != 0. See uip-ds6-route.c. + */ +#if UIP_CONF_MAX_ROUTES != 0 #if ORCHESTRA_UNICAST_SENDER_BASED && ORCHESTRA_COLLISION_FREE_HASH #define UNICAST_SLOT_SHARED_FLAG ((ORCHESTRA_UNICAST_PERIOD < (ORCHESTRA_MAX_HASH + 1)) ? LINK_OPTION_SHARED : 0) @@ -211,3 +219,5 @@ struct orchestra_rule unicast_per_neighbor_rpl_storing = { child_added, child_removed, }; + +#endif /* UIP_MAX_ROUTES */