For Zaptel developpers regarding compilation problem on FC5

Hello,

like some (many ?) people I have had problems compiling zaptel on a Fedora core 5 system, kernel 2.6.15-1.2054.

Error was as follow :

[quote]make[1]: Entering directory /usr/src/kernels/2.6.15-1.2054_FC5-smp-i686' CC [M] /root/install_asterisk_1.4/zaptel-1.4.0-beta1/wcusb.o /root/install_asterisk_1.4/zaptel-1.4.0-beta1/wcusb.c:1451: error: unknown field ?owner? specified in initializer /root/install_asterisk_1.4/zaptel-1.4.0-beta1/wcusb.c:1451: warning: initialization from incompatible pointer type make[2]: *** [/root/install_asterisk_1.4/zaptel-1.4.0-beta1/wcusb.o] Error 1 make[1]: *** [_module_/root/install_asterisk_1.4/zaptel-1.4.0-beta1] Error 2 make[1]: Leaving directory/usr/src/kernels/2.6.15-1.2054_FC5-smp-i686’
make: *** [linux26] Error 2
[/quote]

An easy workaround was to comment or delete references to owner in wcusb.c [1451] and xpp_usb.c [430].

After some searches on kernel.org, I found that usb_driver.owner disappeared in kernel 2.6.15, not 2.6.16, so it seems to me that the compilation problem could easily be avoided by changing :

[quote]#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
owner: THIS_MODULE,
#endif
[/quote]
to

[quote]#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
owner: THIS_MODULE,
#endif
[/quote]

in wcusb.c and xpp_usb.c.

I know for sure that you are much more aware of these problems than I am, and maybe my suggestion is completely wrong, nevertheless it solves the problem on FC5 and seems coherent with what I found regarding kernel changes…

Thanks for your excellent work :wink:

Kewin