This is the mail archive of the mailing list for the newlib project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

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

OK to trunk?


	2013-09-13  Joey Ye  <>

	libc/stdlib/nano-mallocr.c (nano_allopt): Typo fixed to ...
	(nano_mallopt): ... this.

diff --git a/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 */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]