From 153c97fc744d2bf33f5f2ee31e69daa3f6558b7a Mon Sep 17 00:00:00 2001 From: Joakim Gebart Date: Mon, 6 Jul 2015 00:28:37 +0200 Subject: [PATCH] cpu/msp430-common: Add stdlib.h header to ensure malloc is defined. Fixes warnings of the kind: /data/riotbuild/riotbase/sys/bloom/bloom.c: In function 'bloom_new': /data/riotbuild/riotbase/sys/bloom/bloom.c:39:5: error: implicit declaration of function 'calloc' [-Werror=implicit-function-declaration] /data/riotbuild/riotbase/sys/bloom/bloom.c:39:22: error: incompatible implicit declaration of built-in function 'calloc' [-Werror] --- cpu/msp430-common/include/stdlib.h | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 cpu/msp430-common/include/stdlib.h diff --git a/cpu/msp430-common/include/stdlib.h b/cpu/msp430-common/include/stdlib.h new file mode 100644 index 0000000000..42c4a7d7be --- /dev/null +++ b/cpu/msp430-common/include/stdlib.h @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2015 Eistec AB + * + * This file is subject to the terms and conditions of the GNU Lesser General + * Public License v2.1. See the file LICENSE in the top level directory for more + * details. + */ + +/** + * @ingroup msp430 + * @{ + * + * @file + * @brief stdlib.h wrapper for MSP430 + * @see http://www.cplusplus.com/reference/cstdlib/ + * + * @author Joakim Gebart + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* RIOT_MSP430_STDLIB_H_ */