Fix some kernel-mode compilation problems

This commit is contained in:
Gregory Nutt 2013-12-11 16:49:48 -06:00
parent bdf1ad69d6
commit 0c6474cdf0
2 changed files with 4 additions and 2 deletions

View file

@ -83,7 +83,7 @@ FAR void *mm_memalign(FAR struct mm_heap_s *heap, size_t alignment,
if (alignment <= MM_MIN_CHUNK) if (alignment <= MM_MIN_CHUNK)
{ {
return malloc(size); return mm_malloc(heap, size);
} }
/* Adjust the size to account for (1) the size of the allocated node, (2) /* Adjust the size to account for (1) the size of the allocated node, (2)
@ -103,7 +103,7 @@ FAR void *mm_memalign(FAR struct mm_heap_s *heap, size_t alignment,
/* Then malloc that size */ /* Then malloc that size */
rawchunk = (size_t)malloc(allocsize); rawchunk = (size_t)mm_malloc(heap, allocsize);
if (rawchunk == 0) if (rawchunk == 0)
{ {
return NULL; return NULL;

View file

@ -38,6 +38,8 @@
****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <syscall.h> #include <syscall.h>
/* The content of this file is only meaningful during the kernel phase of /* The content of this file is only meaningful during the kernel phase of