From d27f94270285e8c88e386dc35825dc8b2caefe8d Mon Sep 17 00:00:00 2001 From: Bahadir Balban Date: Thu, 13 Mar 2008 00:40:12 +0000 Subject: [PATCH] Very minor fixes. --- tasks/libposix/SConstruct | 2 +- tasks/libposix/open.c | 1 + tasks/mm0/src/task.c | 3 ++- tasks/test0/SConstruct | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tasks/libposix/SConstruct b/tasks/libposix/SConstruct index 3d2479f..714c86d 100644 --- a/tasks/libposix/SConstruct +++ b/tasks/libposix/SConstruct @@ -14,7 +14,7 @@ l4lib_headers = join(project_root, "tasks/libl4/include") config_h = join(project_root, "include/l4/config.h") env = Environment(CC = 'arm-none-linux-gnueabi-gcc', - CCFLAGS = ['-g', '-nostdlib', '-ffreestanding'], + CCFLAGS = ['-g', '-std=gnu99', '-nostdlib', '-ffreestanding'], LINKFLAGS = ['-nostdlib'], ENV = {'PATH' : os.environ['PATH']}, LIBS = 'gcc') diff --git a/tasks/libposix/open.c b/tasks/libposix/open.c index 38367b8..1833b36 100644 --- a/tasks/libposix/open.c +++ b/tasks/libposix/open.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/tasks/mm0/src/task.c b/tasks/mm0/src/task.c index 197fca5..84c727f 100644 --- a/tasks/mm0/src/task.c +++ b/tasks/mm0/src/task.c @@ -257,7 +257,8 @@ int start_boot_task(struct vm_file *file, struct task_ids *ids) */ if ((err = do_mmap(file, 0, task, task->text_start, VM_READ | VM_WRITE | VM_EXEC | VMA_PRIVATE, - __pfn(page_align_up(task->text_end)))) < 0) { + __pfn(page_align_up(task->text_end) - + task->text_start))) < 0) { printf("do_mmap: failed with %d.\n", err); goto error; } diff --git a/tasks/test0/SConstruct b/tasks/test0/SConstruct index 358eb82..0a50ef9 100644 --- a/tasks/test0/SConstruct +++ b/tasks/test0/SConstruct @@ -64,7 +64,7 @@ env = Environment(CC = 'arm-none-linux-gnueabi-gcc', ASFLAGS = ['-D__ASSEMBLY__'], PROGSUFFIX = '.axf', # The suffix to use for final executable ENV = {'PATH' : os.environ['PATH']}, # Inherit shell path - LIBS = [libc_name, 'gcc', libc_name, 'libl4', 'libposix'], + LIBS = [libc_name, 'gcc', libc_name, 'libl4', 'libposix', libc_name], CPPFLAGS = "-D__USERSPACE__", CPPPATH = ['#include', libl4_incpath, libposix_incpath, kernel_incpath])