All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: buildroot@buildroot.org
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: [Buildroot] [PATCH 1/2] package/igh-ethercat: backport upstream fix to build with Linux >= 6.19.0
Date: Thu, 20 Aug 2026 22:27:34 +0200	[thread overview]
Message-ID: <20260820202736.1301073-1-thomas.petazzoni@bootlin.com> (raw)

Fixes:

  https://autobuild.buildroot.org/results/9b270904b2f7cf9eaa661c98370c582a61ff2342/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 .../0002-Linux-6.19.0-support.patch           | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 package/igh-ethercat/0002-Linux-6.19.0-support.patch

diff --git a/package/igh-ethercat/0002-Linux-6.19.0-support.patch b/package/igh-ethercat/0002-Linux-6.19.0-support.patch
new file mode 100644
index 0000000000..6a6af5508c
--- /dev/null
+++ b/package/igh-ethercat/0002-Linux-6.19.0-support.patch
@@ -0,0 +1,36 @@
+From 2c947e90d93d9c5a0129b62744de9720b48d2a17 Mon Sep 17 00:00:00 2001
+From: Nicola Fontana <ntd@entidi.it>
+Date: Sun, 8 Mar 2026 15:39:41 +0100
+Subject: [PATCH] Linux 6.19.0 support
+
+Commit 89aec171d9d1ab168e43fcf9754b82e4c0aef9b9 (part of linux kernel
+6.19.0-rc1) introduced an arbitrarily sized sockaddr struct to be used
+instead of the classical one.
+
+Closes #200
+
+Upstream: https://gitlab.com/etherlab.org/ethercat/-/commit/c42c9cf8bc31c56cc20ae630605495e3f19f3f9a
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+---
+ devices/generic.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/devices/generic.c b/devices/generic.c
+index f6cef9b5..a08af54b 100644
+--- a/devices/generic.c
++++ b/devices/generic.c
+@@ -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);
+-- 
+2.55.0
+
-- 
2.55.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

             reply	other threads:[~2026-08-20 20:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-20 20:27 Thomas Petazzoni via buildroot [this message]
2026-08-20 20:27 ` [Buildroot] [PATCH 2/2] package/igh-ethercat: bump to 1.6.12 Thomas Petazzoni via buildroot
2026-08-21 20:32   ` Julien Olivain via buildroot
2026-08-21 20:32 ` [Buildroot] [PATCH 1/2] package/igh-ethercat: backport upstream fix to build with Linux >= 6.19.0 Julien Olivain via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260820202736.1301073-1-thomas.petazzoni@bootlin.com \
    --to=buildroot@buildroot.org \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.