当前位置: 技术问答>linux和unix
Driver error!! Help!!!
来源: 互联网 发布时间:2015-07-06
本文导语: (i can't input chinese in my redhat9) when i using like this : [root@localhost usb]# gcc usb-skeleton.c In file included from /usr/include/linux/sched.h:14, from usb-skeleton.c:40: /usr/include/linux/timex.h:173: field `time' ha...
(i can't input chinese in my redhat9)
when i using like this :
[root@localhost usb]# gcc usb-skeleton.c
In file included from /usr/include/linux/sched.h:14,
from usb-skeleton.c:40:
/usr/include/linux/timex.h:173: 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 usb-skeleton.c:40:
/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 usb-skeleton.c:40:
/usr/include/asm/signal.h:107: parse error before "sigset_t"
/usr/include/asm/signal.h:110: parse error before '}' token
In file included from /usr/include/linux/sched.h:81,
from usb-skeleton.c:40:
/usr/include/linux/timer.h:32: field `vec' has incomplete type
/usr/include/linux/timer.h:37: field `vec' has incomplete type
/usr/include/linux/timer.h:45: parse error before "spinlock_t"
/usr/include/linux/timer.h:53: parse error before '}' token
/usr/include/linux/timer.h:63: field `list' has incomplete type
/usr/include/linux/timer.h:67: parse error before "tvec_base_t"
/usr/include/linux/timer.h:101: parse error before "tvec_bases"
/usr/include/linux/timer.h: In function `init_timer':
/usr/include/linux/timer.h:105: dereferencing pointer to incomplete type
/usr/include/linux/timer.h:105: dereferencing pointer to incomplete type
/usr/include/linux/timer.h:106: dereferencing pointer to incomplete type
/usr/include/linux/timer.h: In function `timer_pending':
/usr/include/linux/timer.h:121: dereferencing pointer to incomplete type
In file included from /usr/include/asm/pgtable.h:17,
from /usr/include/linux/pagemap.h:15,
from /usr/include/linux/locks.h:8,
from /usr/include/linux/devfs_fs_kernel.h:6,
from usb-skeleton.c:51:
..........
....................
...............................
usb-skeleton.c:80: elements of array `skel_table' have incomplete type
usb-skeleton.c:81: warning: excess elements in struct initializer
usb-skeleton.c:81: warning: (near initialization for `skel_table[0]')
usb-skeleton.c:115: field `tqueue' has incomplete type
usb-skeleton.c:117: field `sem' has incomplete type
........................
...................................
(too many error)
what's wrong??help me!!!!
when i using like this :
[root@localhost usb]# gcc usb-skeleton.c
In file included from /usr/include/linux/sched.h:14,
from usb-skeleton.c:40:
/usr/include/linux/timex.h:173: 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 usb-skeleton.c:40:
/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 usb-skeleton.c:40:
/usr/include/asm/signal.h:107: parse error before "sigset_t"
/usr/include/asm/signal.h:110: parse error before '}' token
In file included from /usr/include/linux/sched.h:81,
from usb-skeleton.c:40:
/usr/include/linux/timer.h:32: field `vec' has incomplete type
/usr/include/linux/timer.h:37: field `vec' has incomplete type
/usr/include/linux/timer.h:45: parse error before "spinlock_t"
/usr/include/linux/timer.h:53: parse error before '}' token
/usr/include/linux/timer.h:63: field `list' has incomplete type
/usr/include/linux/timer.h:67: parse error before "tvec_base_t"
/usr/include/linux/timer.h:101: parse error before "tvec_bases"
/usr/include/linux/timer.h: In function `init_timer':
/usr/include/linux/timer.h:105: dereferencing pointer to incomplete type
/usr/include/linux/timer.h:105: dereferencing pointer to incomplete type
/usr/include/linux/timer.h:106: dereferencing pointer to incomplete type
/usr/include/linux/timer.h: In function `timer_pending':
/usr/include/linux/timer.h:121: dereferencing pointer to incomplete type
In file included from /usr/include/asm/pgtable.h:17,
from /usr/include/linux/pagemap.h:15,
from /usr/include/linux/locks.h:8,
from /usr/include/linux/devfs_fs_kernel.h:6,
from usb-skeleton.c:51:
..........
....................
...............................
usb-skeleton.c:80: elements of array `skel_table' have incomplete type
usb-skeleton.c:81: warning: excess elements in struct initializer
usb-skeleton.c:81: warning: (near initialization for `skel_table[0]')
usb-skeleton.c:115: field `tqueue' has incomplete type
usb-skeleton.c:117: field `sem' has incomplete type
........................
...................................
(too many error)
what's wrong??help me!!!!
|
你要指定包含的头文件是内核库文件
-I /usr/src/linux/include
而不是本系统上默认的库文件
-I /usr/src/linux/include
而不是本系统上默认的库文件