aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/include
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/include
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/include')
-rw-r--r--extras/mini-os/include/endian.h4
-rw-r--r--extras/mini-os/include/xmalloc.h10
2 files changed, 9 insertions, 5 deletions
diff --git a/extras/mini-os/include/endian.h b/extras/mini-os/include/endian.h
index cdf432bc43..534551767a 100644
--- a/extras/mini-os/include/endian.h
+++ b/extras/mini-os/include/endian.h
@@ -12,4 +12,8 @@
#include <arch_wordsize.h>
+#define BYTE_ORDER __BYTE_ORDER
+#define BIG_ENDIAN __BIG_ENDIAN
+#define LITTLE_ENDIAN __LITTLE_ENDIAN
+
#endif /* endian.h */
diff --git a/extras/mini-os/include/xmalloc.h b/extras/mini-os/include/xmalloc.h
index 13b242e21e..11fb0279f6 100644
--- a/extras/mini-os/include/xmalloc.h
+++ b/extras/mini-os/include/xmalloc.h
@@ -14,16 +14,16 @@
#include <limits.h>
#define DEFAULT_ALIGN (sizeof(unsigned long))
-#define malloc(size) _xmalloc(size, DEFAULT_ALIGN)
-#define free(ptr) xfree(ptr)
-#define realloc(ptr, size) _realloc(ptr, size)
-/* Free any of the above. */
+extern void *malloc(size_t size);
+extern void *realloc(void *ptr, size_t size);
+extern void free(void *ptr);
+
+/* Free memory from any xmalloc*() call. */
extern void xfree(const void *);
/* Underlying functions */
extern void *_xmalloc(size_t size, size_t align);
-extern void *_realloc(void *ptr, size_t size);
#endif