日期:2014-05-16  浏览次数:20790 次

centos6.2编译安装compat-wireless时报错。求教!
系统是装在VM虚拟机下的,版本是centos6.2。想装无线网卡,但在编译compat-wireless时报错。
请教原因和解决方法。多谢!

报错如下:
Assembly code
make -C /lib/modules/2.6.32-220.e16.x86_64/build M=/root/compat-wireless-2012-05-10 modules
make[1]: Entering directory '/usr/src/kernels/2.6.32-220.e16.x86_64'
  CC [M] /root/compat-wireless-2012-05-10/compat/main.o
In dile included from /root/compat-wireless-2012-05-10/include/linux/compat-2.6.
h:55,
                 from <command-line>:0:
/root/compat-wireless-2012-05-10/include/linux/compat-2.6.35.h:27: error:static
 declaration of 'irq_set_affinity_hint' follows non-static declaration
include/linux/interrupt.h:218: note: previous declaration of 'irq_set_affinity_hint' was here
In file included from /root/compat-wireless-2012-05-10/include/linux/compat-2.6.
h:61,
                 from <command-line>:0:
/root/compat-wireless-2012-05-10/include/linux/compat-3.1.h:11: error: redefinition of '__ne
tdev_alloc_skb_ip_align'
include/linux/skbuff.h:1512: note: previous definition of '__netdev_alloc_skb_ip_align' was 
here
make[3]: *** [/root/compat-wireless-2012-05-10/compat/main.o] Error 1
make[2]: *** [/root/compat-wireless-2012-05-10/compat] Error 2
make[1]: *** [_module_/root/compat-wireless-2012-05-10] Error 2
make[1]: *** Leaving directory '/usr/src/kernels/2.6.32-220.e16.x86_64'
make: *** [modules] Error 2




------解决方案--------------------
看样你下的驱动包里有自带的兼容头文件, 里面的函数和系统里的头文件的函数名重复声明了.

你去驱动包里的这两个头文件, 注释掉这两个函数就行了.