aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/lib
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2013-01-30 02:38:37 -0800
committerDavid Vrabel <david.vrabel@citrix.com>2013-01-30 02:38:37 -0800
commit122b7986416622dbddeb71fdbc41aa93b5f7bbab (patch)
tree6ecc6a59d3c0d3fc687e1300f2514610b03dc2c9 /extras/mini-os/lib
parent6cf13d0d523e20557e11a94fda51452f54c3a1b5 (diff)
downloadxen-122b7986416622dbddeb71fdbc41aa93b5f7bbab.tar.gz
xen-122b7986416622dbddeb71fdbc41aa93b5f7bbab.tar.bz2
xen-122b7986416622dbddeb71fdbc41aa93b5f7bbab.zip
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 <david.vrabel@citrix.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'extras/mini-os/lib')
-rw-r--r--extras/mini-os/lib/xmalloc.c12
1 files changed, 11 insertions, 1 deletions
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
/*