From f274b265886a13661b756b48a674b13bd7e70c58 Mon Sep 17 00:00:00 2001 From: adamdunkels Date: Thu, 3 Jul 2008 07:38:52 +0000 Subject: [PATCH] Added CC_CONST_FUNCTION as a work-around to the sdcc const function pointer bug --- core/net/rime/chameleon-bitopt.c | 4 ++-- core/net/rime/chameleon-bitopt.h | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/core/net/rime/chameleon-bitopt.c b/core/net/rime/chameleon-bitopt.c index 5cf3657f3..7071a7b7b 100644 --- a/core/net/rime/chameleon-bitopt.c +++ b/core/net/rime/chameleon-bitopt.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: chameleon-bitopt.c,v 1.4 2008/04/01 13:22:59 nifi Exp $ + * $Id: chameleon-bitopt.c,v 1.5 2008/07/03 07:38:52 adamdunkels Exp $ */ /** @@ -334,7 +334,7 @@ unpack_header(void) return c; } /*---------------------------------------------------------------------------*/ -const struct chameleon_module chameleon_bitopt = { +CC_CONST_FUNCTION struct chameleon_module chameleon_bitopt = { unpack_header, pack_header, header_size, diff --git a/core/net/rime/chameleon-bitopt.h b/core/net/rime/chameleon-bitopt.h index e5b70d120..2f167f96a 100644 --- a/core/net/rime/chameleon-bitopt.h +++ b/core/net/rime/chameleon-bitopt.h @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: chameleon-bitopt.h,v 1.1 2008/02/25 02:14:34 adamdunkels Exp $ + * $Id: chameleon-bitopt.h,v 1.2 2008/07/03 07:38:52 adamdunkels Exp $ */ /** @@ -41,6 +41,8 @@ #ifndef __CHAMELEON_BITOPT_H__ #define __CHAMELEON_BITOPT_H__ -extern const struct chameleon_module chameleon_bitopt; +#include "sys/cc.h" + +extern CC_CONST_FUNCTION struct chameleon_module chameleon_bitopt; #endif /* __CHAMELEON_BITOPT_H__ */