error: unknown field 'ioctl' specified in initializer问题

error: unknown field 'ioctl' specified in initializer问题是由于2.6.36内核之后 去掉了原来的ioctl,添加两个新的成员,所以会出错

long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);

 long (*compat_ioctl) (struct file *, unsigned int, unsigned long);

 所以修改源文件中file_operations内.ioctl 改为 .compat_ioctl 即可

你可能感兴趣的:(error: unknown field 'ioctl' specified in initializer问题)