【问题标题】:parse error before "Ioff_t"在“Ioff_t”之前解析错误
【发布时间】: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头,但是错误仍然存​​在。任何人都遇到过这个什么样的问题?能否给点建议和帮助?

【问题讨论】:

  • 张贴有问题的行和它之前的几行。

标签: c linux driver


【解决方案1】:

那是带有小写“L”的loff_t,而不是Ioff_t

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-04-21
    • 1970-01-01
    相关资源
    最近更新 更多