From c9ac19b919844542d8629d0c300ac54763aca713 Mon Sep 17 00:00:00 2001 From: Mariano Alvira Date: Fri, 9 Dec 2011 08:36:23 -0500 Subject: [PATCH] Allocate the default_instance pointer in rpl-dag.c instead of the header file to fix "multiple definition of `default_instance'" errors. --- core/net/rpl/rpl-dag.c | 1 + core/net/rpl/rpl-private.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/net/rpl/rpl-dag.c b/core/net/rpl/rpl-dag.c index 0ce3e0f87..e9d15ee57 100755 --- a/core/net/rpl/rpl-dag.c +++ b/core/net/rpl/rpl-dag.c @@ -96,6 +96,7 @@ MEMB(parent_memb, struct rpl_parent, RPL_MAX_PARENTS_PER_DODAG*RPL_MAX_INSTANCES /************************************************************************/ /* Allocate instance table. */ rpl_instance_t instance_table[RPL_MAX_INSTANCES]; +rpl_instance_t *default_instance; /************************************************************************/ /* Remove DAG parents with a rank that is at least the same as minimum_rank. */ diff --git a/core/net/rpl/rpl-private.h b/core/net/rpl/rpl-private.h index 1936c124a..ac4eba542 100644 --- a/core/net/rpl/rpl-private.h +++ b/core/net/rpl/rpl-private.h @@ -253,7 +253,7 @@ extern rpl_stats_t rpl_stats; /*---------------------------------------------------------------------------*/ /* Instances */ extern rpl_instance_t instance_table[]; -rpl_instance_t *default_instance; +extern rpl_instance_t *default_instance; /* ICMPv6 functions for RPL. */ void dis_output(uip_ipaddr_t *addr);