From 42e747e4fe5648967c1ead5ae327b5fbbe66f2e5 Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Sat, 6 Nov 2010 16:20:13 -0400 Subject: avoid including header files directly The kernel warns against including header files directly. For good reason: our previous approach (just -I$KERNEL/include) caused all kinds of files to be included that should have come from /usr/include instead. This patch rewrites the Makfile so that the (few) needed headers are copied into the liblitmus src tree before compiling the library. This avoids having to specify the kernel include directories with -I, and also makes it easier to link against liblitmus (external applications do not need to know where the kernel is). Finally, this allows us to enable -Werror. --- src/syscalls.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/syscalls.c b/src/syscalls.c index 77a6277..c738ac4 100644 --- a/src/syscalls.c +++ b/src/syscalls.c @@ -1,13 +1,16 @@ /* To get syscall() we need to define _GNU_SOURCE * in modern glibc versions. */ + +/* imported from the kernel source tree */ +#include "asm/unistd.h" + +/* for syscall() */ #include -#include -#include -#include "litmus.h" +//#include -struct np_flag; +#include "litmus.h" /* Syscall stub for setting RT mode and scheduling options */ -- cgit v1.2.2