netlink_kernel_create is not working with latest linux kernel

前端 未结 3 1647
情深已故
情深已故 2021-02-04 11:28

I am getting compiler error while compiling my old kernel module which is using netlink functions.

int
init_module()
{
    /* Initialize the Netlin         


        
3条回答
  •  再見小時候
    2021-02-04 12:08

    That's because in 3.8 the netlink_kernel_create prototype has been changed:

    netlink_kernel_create(struct net *net, int unit, struct netlink_kernel_cfg *cfg)

    (and q.v. http://lxr.linux.no/linux+v3.8/include/linux/netlink.h#L48)

    You've no option but to rewrite the kernel module, and remove that extra argument (THIS_MODULE), as well as implement the netlink_kernel_cfg struct.

提交回复
热议问题