Merge branch 'fix-6.19' into 'stable-1.6'
Linux 6.19.0 support Closes #200 See merge request etherlab.org/ethercat!183
This commit is contained in:
commit
4e5b661674
|
|
@ -234,7 +234,11 @@ int ec_gen_device_create_socket(
|
|||
sa.sll_family = AF_PACKET;
|
||||
sa.sll_protocol = htons(ETH_P_ETHERCAT);
|
||||
sa.sll_ifindex = desc->ifindex;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 19, 0)
|
||||
ret = kernel_bind(dev->socket, (struct sockaddr_unsized *) &sa, sizeof(sa));
|
||||
#else
|
||||
ret = kernel_bind(dev->socket, (struct sockaddr *) &sa, sizeof(sa));
|
||||
#endif
|
||||
if (ret) {
|
||||
printk(KERN_ERR PFX "Failed to bind() socket to interface"
|
||||
" (ret = %i).\n", ret);
|
||||
|
|
|
|||
Loading…
Reference in New Issue