diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2010-11-06 16:20:13 -0400 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2010-11-09 16:35:32 -0500 |
commit | 42e747e4fe5648967c1ead5ae327b5fbbe66f2e5 (patch) | |
tree | 44d58ef7b2458d3c71e52f6441077100c218e04f /src | |
parent | 35b88760be5b5dbda859f4697702efc0b3cd2663 (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/syscalls.c | 11 |
1 files changed, 7 insertions, 4 deletions
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 @@ | |||
1 | /* To get syscall() we need to define _GNU_SOURCE | 1 | /* To get syscall() we need to define _GNU_SOURCE |
2 | * in modern glibc versions. | 2 | * in modern glibc versions. |
3 | */ | 3 | */ |
4 | |||
5 | /* imported from the kernel source tree */ | ||
6 | #include "asm/unistd.h" | ||
7 | |||
8 | /* for syscall() */ | ||
4 | #include <unistd.h> | 9 | #include <unistd.h> |
5 | #include <linux/unistd.h> | ||
6 | #include <sys/types.h> | ||
7 | 10 | ||
8 | #include "litmus.h" | 11 | //#include <sys/types.h> |
9 | 12 | ||
10 | struct np_flag; | 13 | #include "litmus.h" |
11 | 14 | ||
12 | /* Syscall stub for setting RT mode and scheduling options */ | 15 | /* Syscall stub for setting RT mode and scheduling options */ |
13 | 16 | ||