‘struct net_device’ has no member named ‘trans_start’ ubuntu16.04

来源:互联网 发布:同花顺选股编程 编辑:程序博客网 时间:2024/05/16 08:06

编译usb-to-can_v2_socketcan,出现一下错误:

‘struct net_device’ has no member named ‘trans_start’
  netdev->trans_start = jiffies;

解决办法:

打开ixx_usb_core.c 找到netdev->trans_start = jiffies;这句代码,更换成一下代码:

netdev_get_tx_queue(netdev,0)->trans_start = jiffies;


出现这个问题的原因可能是,linux内核版本不相同,Linux 4.10内核的netdevice结构重新编写了的,与以前的很不一样.

我的linux版本为:Linux robot-GL502VML 4.10.0-38-generic #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux


查看版本命令:uname -a



阅读全文
0 0
原创粉丝点击