- 论坛徽章:
- 0
|
[root@localhost lulu_linux]# make
gcc -D_KERNEL_ -D_MODULE -I -O2 -Wall -O -c lulu.c -o lulu.o
In file included from /usr/include/linux/sched.h:13,
from lulu.c:5:
/usr/include/linux/times.h:7: error: syntax error before "clock_t"
/usr/include/linux/times.h:9: error: syntax error before "tms_cutime"
/usr/include/linux/times.h:10: error: syntax error before "tms_cstime"
In file included from /usr/include/linux/sched.h:14,
from lulu.c:5:
/usr/include/linux/timex.h:148: error: field `time' has incomplete type
In file included from /usr/include/linux/signal.h:4,
from /usr/include/linux/sched.h:25,
from lulu.c:5:
/usr/include/asm/signal.h:107: error: syntax error before "sigset_t"
/usr/include/asm/signal.h:110: error: syntax error before '}' token
In file included from /usr/include/linux/signal.h:5,
from /usr/include/linux/sched.h:25,
from lulu.c:5:
/usr/include/asm/siginfo.h:26: error: syntax error before "pid_t"
/usr/include/asm/siginfo.h:38: error: syntax error before "pid_t"
/usr/include/asm/siginfo.h:41: error: syntax error before '}' token
/usr/include/asm/siginfo.h:45: error: syntax error before "pid_t"
/usr/include/asm/siginfo.h:48: error: syntax error before "_utime"
/usr/include/asm/siginfo.h:49: error: syntax error before "_stime"
/usr/include/asm/siginfo.h:62: error: syntax error before '}' token
/usr/include/asm/siginfo.h:63: error: syntax error before '}' token
In file included from /usr/include/linux/sched.h:65,
from lulu.c:5:
/usr/include/linux/time.h:10: error: syntax error before "time_t"
/usr/include/linux/time.h:12: error: syntax error before '}' token
/usr/include/linux/time.h:18: error: syntax error before "time_t"
/usr/include/linux/time.h:44: error: field `it_interval' has incomplete type
/usr/include/linux/time.h:45: error: field `it_value' has incomplete type
/usr/include/linux/time.h:49: error: field `it_interval' has incomplete type
/usr/include/linux/time.h:50: error: field `it_value' has incomplete type
In file included from /usr/include/linux/sched.h:67,
from lulu.c:5:
/usr/include/linux/resource.h:22: error: field `ru_utime' has incomplete type
/usr/include/linux/resource.h:23: error: field `ru_stime' has incomplete type
lulu.c:10: warning: "struct file" declared inside parameter list
lulu.c:10: warning: its scope is only this definition or declaration, which is probably not what you want
lulu.c:10: warning: "struct inode" declared inside parameter list
lulu.c:11: warning: "struct file" declared inside parameter list
lulu.c:11: warning: "struct inode" declared inside parameter list
lulu.c:12: error: syntax error before "lulu_read"
lulu.c:12: error: syntax error before "loff_t"
lulu.c:12: warning: type defaults to `int' in declaration of `lulu_read'
lulu.c:12: warning: data definition has no type or storage class
lulu.c:13: warning: "struct file" declared inside parameter list
lulu.c:13: warning: "struct inode" declared inside parameter list
lulu.c:19: error: variable `lulu_fops' has initializer but incomplete type
lulu.c:20:28: token "=" is not valid in preprocessor expressions
lulu.c:23: error: unknown field `llseek' specified in initializer
lulu.c:23: warning: excess elements in struct initializer
lulu.c:23: warning: (near initialization for `lulu_fops')
lulu.c:24: error: unknown field `read' specified in initializer
lulu.c:24: warning: excess elements in struct initializer
lulu.c:24: warning: (near initialization for `lulu_fops')
lulu.c:25: error: unknown field `write' specified in initializer
lulu.c:25: error: `lulu_write' undeclared here (not in a function)
lulu.c:25: warning: excess elements in struct initializer
lulu.c:25: warning: (near initialization for `lulu_fops')
lulu.c:26: error: unknown field `ioctl' specified in initializer
lulu.c:26: warning: excess elements in struct initializer
lulu.c:26: warning: (near initialization for `lulu_fops')
lulu.c:27: error: unknown field `open' specified in initializer
lulu.c:27: warning: excess elements in struct initializer
lulu.c:27: warning: (near initialization for `lulu_fops')
lulu.c:28: error: unknown field `release' specified in initializer
lulu.c:28: error: `lulu_release' undeclared here (not in a function)
lulu.c:28: warning: excess elements in struct initializer
lulu.c:28: warning: (near initialization for `lulu_fops')
lulu.c: In function `lulu_init':
lulu.c:35: warning: implicit declaration of function `register_chrdev'
lulu.c:37: warning: implicit declaration of function `printk'
lulu.c:37: error: `KERN_CRIT' undeclared (first use in this function)
lulu.c:37: error: (Each undeclared identifier is reported only once
lulu.c:37: error: for each function it appears in.)
lulu.c:37: error: syntax error before string constant
lulu.c:47:2: invalid preprocessing directive #indef
lulu.c: At top level:
lulu.c:49: error: syntax error before string constant
lulu.c:49: warning: type defaults to `int' in declaration of `MODULE_DESCRIPION'lulu.c:49: warning: data definition has no type or storage class
lulu.c:51:49: macro "MODULE_PARM" requires 2 arguments, but only 1 given
lulu.c:51: warning: type defaults to `int' in declaration of `MODULE_PARM'
lulu.c:51: warning: data definition has no type or storage class
lulu.c: In function `cleanuo_module':
lulu.c:58: warning: implicit declaration of function `lulu_cleanup'
lulu.c: At top level:
lulu.c:19: error: storage size of `lulu_fops' isn't known
lulu.c:10: warning: 'lulu_open' declared `static' but never defined
lulu.c:11: warning: 'lulu_close' declared `static' but never defined
lulu.c:13: warning: 'lulu_ioctl' declared `static' but never defined
lulu.c:14: warning: 'lulu_clean' declared `static' but never defined
make: *** [lulu.o] 错误 1 |
|