解决“Ioff_t”之前的错误

时间:2010-12-03 09:35:51

标签: c linux driver

我正在编写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中定义,所以我将#include标头添加到源代码rf531_drv.c中,但错误仍然存​​在。任何人都遇到过这个那种问题?你能提出一些建议和帮助吗?

1 个答案:

答案 0 :(得分:3)

loff_t的小写字母为“L”,不是Ioff_t