|
报错情况如下,请大侠指点,谢谢!!
[root@localhost e-disk]# gcc -c test3.c -I /usr/src/linux/ -DMOUDLE -D_KERNEL__
In file included from /usr/include/linux/fs.h:23,
from /usr/include/linux/capability.h:17,
from /usr/include/linux/binfmts.h:5,
from /usr/include/linux/sched.h:9,
from test3.c:11:
/usr/include/linux/string.h:8:2: warning: #warning Using kernel header in userland!
In file included from /usr/include/linux/sched.h:14,
from test3.c:11:
/usr/include/linux/timex.h:173: error: field `time' has incomplete type
In file included from /usr/include/linux/bitops.h:69,
from /usr/include/asm/system.h:7,
from /usr/include/linux/sched.h:16,
from test3.c:11:
/usr/include/asm/bitops.h:327:2: warning: #warning This includefile is not available on all architectures.
/usr/include/asm/bitops.h:328:2: warning: #warning Using kernel headers in userspace: atomicity not guaranteed
In file included from /usr/include/linux/signal.h:4,
from /usr/include/linux/sched.h:25,
from test3.c:11:
/usr/include/asm/signal.h:107: error: parse error before "sigset_t"
/usr/include/asm/signal.h:110: error: parse error before '}' token
In file included from /usr/include/linux/sched.h:81,
from test3.c:11:
/usr/include/linux/timer.h:45: error: parse error before "spinlock_t"
/usr/include/linux/timer.h:53: error: parse error before '}' token
/usr/include/linux/timer.h:67: error: parse error before "tvec_base_t"
/usr/include/linux/timer.h:101: error: parse error before "tvec_bases"
/usr/include/linux/timer.h: In function `init_timer':
/usr/include/linux/timer.h:105: error: dereferencing pointer to incomplete type
/usr/include/linux/timer.h:105: error: dereferencing pointer to incomplete type
/usr/include/linux/timer.h:106: error: dereferencing pointer to incomplete type
/usr/include/linux/timer.h: In function `timer_pending':
/usr/include/linux/timer.h:121: error: dereferencing pointer to incomplete type
In file included from test3.c:13:
/usr/include/linux/malloc.h:3:2: warning: #warning The Use of linux/malloc.h is
deprecated, use linux/slab.h
test3.c:99:79: warning: no newline at end of file
test3.c: At top level:
test3.c:99: error: parse error at end of input
[root@localhost e-disk]#
怎么会是头文件报错呀,本人百思不得其解。 |
|