Hello.есть модуль для специализированной железки для рассчетов.
этот модуль прекрасно собирается и работает на ядрах < 2.6.25
на ядрах >= 2.6.25 при компиляции получаем:
error: variable 'fops' has initializer but incomplete type
error: unknown field 'ioctl' specified in initializer
warning: excess elements in struct initializer
warning: (near initialization for 'fops')
error: unknown field 'mmap' specified in initializer
warning: excess elements in struct initializer
warning: (near initialization for 'fops')
error: unknown field 'open' specified in initializer
warning: excess elements in struct initializer
warning: (near initialization for 'fops')
error: unknown field 'release' specified in initializer
warning: excess elements in struct initializer
warning: (near initialization for 'fops')
error: unknown field 'nopage' specified in initializer
warning: initialization from incompatible pointer type
error: unknown field 'nopage' specified in initializer
warning: initialization from incompatible pointer type
In function 'modpci_init':
error: implicit declaration of function 'register_chrdev'
In function 'modpci_exit':
error: implicit declaration of function 'unregister_chrdev'
In function 'modpci_ioctl':
error: implicit declaration of function 'MINOR'
error: dereferencing pointer to incomplete type
warning: ignoring return value of 'copy_from_user', declared with attribute warn_unused_result
warning: ignoring return value of 'copy_from_user', declared with attribute warn_unused_result
warning: ignoring return value of 'copy_to_user', declared with attribute warn_unused_result
warning: ignoring return value of 'copy_to_user', declared with attribute warn_unused_result
warning: ignoring return value of 'copy_to_user', declared with attribute warn_unused_result
In function 'modpci_dmar_vma_nopage':
error: dereferencing pointer to incomplete type
In function 'modpci_dmaw_vma_nopage':
error: dereferencing pointer to incomplete type
In function 'modpci_mmap':
error: dereferencing pointer to incomplete type
In function 'n_modpci_exist':
warning: 'pci_find_device' is
deprecated (declared at include/linux/pci.h:514)
make[2]: *** [modpci.o] Error 1
make[1]: *** [modpci] Error 2
make: *** [default] Error 2
Что за нововведения произошли в более новых ядрах?
Куда смотреть и что починить?
От версии компилятора это не зависит.
Thanx.