From 122b7986416622dbddeb71fdbc41aa93b5f7bbab Mon Sep 17 00:00:00 2001 From: David Vrabel Date: Wed, 30 Jan 2013 02:38:37 -0800 Subject: mini-os: build fixes for lwip 1.3.2 Various fixes to mini-os needed to build lwip 1.3.2: - Don't build the tests. - Add BSD-style endianness macros to endian.h. - free() is called via a function pointer so it needs to be a real function. Do the same for malloc() and realloc(). Signed-off-by: David Vrabel Acked-by: Samuel Thibault Committed-by: Keir Fraser --- extras/mini-os/lib/xmalloc.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'extras/mini-os/lib') diff --git a/extras/mini-os/lib/xmalloc.c b/extras/mini-os/lib/xmalloc.c index 015cd31bb9..23e367d3d6 100644 --- a/extras/mini-os/lib/xmalloc.c +++ b/extras/mini-os/lib/xmalloc.c @@ -267,7 +267,12 @@ void xfree(const void *p) /* spin_unlock_irqrestore(&freelist_lock, flags); */ } -void *_realloc(void *ptr, size_t size) +void *malloc(size_t size) +{ + return _xmalloc(size, DEFAULT_ALIGN); +} + +void *realloc(void *ptr, size_t size) { void *new; struct xmalloc_hdr *hdr; @@ -296,6 +301,11 @@ void *_realloc(void *ptr, size_t size) return new; } + +void free(void *ptr) +{ + xfree(ptr); +} #endif /* -- cgit v1.2.3