[patch][newlib][nano] Fix typo in malloc_mallopt

Jeff Johnston jjohnstn@redhat.com
Fri Sep 13 16:52:00 GMT 2013


Patch checked in.

-- Jeff J.

On 09/13/2013 05:56 AM, Joey Ye wrote:
> When use malloc_stats or mallopt, nano malloc will error:
> mstats.c:(.text.mallopt+0xa): undefined reference to `_mallopt_r'
>
> It was caused by a typo in nano-mallocr. Attached patch fixes this obvious
> typo.
>
> OK to trunk?
>
> ChangeLog:
>
> 	2013-09-13  Joey Ye  <joey.ye@arm.com>
>
> 	libc/stdlib/nano-mallocr.c (nano_allopt): Typo fixed to ...
> 	(nano_mallopt): ... this.
>
> diff --git a/newlib/libc/stdlib/nano-mallocr.c
> b/newlib/libc/stdlib/nano-mallocr.c
> index e0a9195..0d90680 100644
> --- a/newlib/libc/stdlib/nano-mallocr.c
> +++ b/newlib/libc/stdlib/nano-mallocr.c
> @@ -72,7 +72,7 @@
>   #define nano_malloc_usable_size _malloc_usable_size_r
>   #define nano_malloc_stats	_malloc_stats_r
>   #define nano_mallinfo		_mallinfo_r
> -#define nano_allopt		_mallopt_r
> +#define nano_mallopt		_mallopt_r
>
>   #else /* ! INTERNAL_NEWLIB */
>
> @@ -94,7 +94,7 @@
>   #define nano_malloc_usable_size malloc_usable_size
>   #define nano_malloc_stats	malloc_stats
>   #define nano_mallinfo		mallinfo
> -#define nano_allopt		mallopt
> +#define nano_mallopt		mallopt
>   #endif /* ! INTERNAL_NEWLIB */
>
>   /* Define free_list as internal name to avoid conflict with user names */
>
>
>



More information about the Newlib mailing list