【发布时间】:2010-12-03 09:35:50
【问题描述】:
我正在编写一个 RFID 设备驱动程序并遇到以下编译错误:
[root@localhost kernel]# make modules
CHK include/linux/version.h
make[1]: `arch/arm/kernel/asm-offsets.s' is up to date.
make[1]: `include/asm-arm/mach-types.h' is up to date.
CC [M] drivers/char/gpio_led.o
CC [M] drivers/char/rf531_drv.o
drivers/char/rf531_drv.c:35: error: parse error before "Ioff_t"
drivers/char/rf531_drv.c:35: warning: function declaration isn't a prototype
drivers/char/rf531_drv.c:36: error: parse error before "Ioff_t"
drivers/char/rf531_drv.c:36: warning: function declaration isn't a prototype
然后我发现类型Ioff_t是在$(srctree)/include/linux/types.h中定义的,所以我在源代码rf531_drv.c中添加了#include头,但是错误仍然存在。任何人都遇到过这个什么样的问题?能否给点建议和帮助?
【问题讨论】:
-
张贴有问题的行和它之前的几行。