from /usr/include/linux/slab.h:14,
from /usr/include/linux/malloc.h:4,
from hello.c:15:
/usr/include/linux/sched.h:506: parse error before `siginfo_t'
hello.c:44: parse error before character 0241
hello.c:47: conflicting types for `sys_call_table'
hello.c:16: previous declaration of `sys_call_table'
hello.c:47: invalid initializer
hello.c:47: warning: data definition has no type or storage class
hello.c:48: parse error before `return'
hello.c:51: parse error before character 0241
不知究竟错在何处,希望各位师兄多多指教。'
/*hello.c*/
#define module
#define __kernel__
#include <linux/module.h>
#include <linux/kernel.h>
#include <asm/unistd.h>
#include <sys/syscall.h>
//#include <sys/types.h>
//#include <asm/fcntl.h>
#include <asm/errno.h>
//#include <linux/types.h>
//#include <linux/dirent.h>
//#include <sys/mman.h>
#include <linux/string.h>
//#include <linux/fs.h>
#include <linux/malloc.h>
extern void* sys_call_table[];
int (*orig_open)(const char *pathname, int flag,..
.....
试一试
您在编译时再加上 -v2.7.2.3 选项试试,我多次遇问题,这样做好象百试百中