SHA256
1
0
forked from pool/dpdk
dpdk/kni-fix-build-with-Linux-6.8.patch
Ana Guerrero b3e62b524a Accepting request 1187835 from home:jirislaby:branches:network
- add kni-fix-build-with-Linux-6.10.patch to fix build against
  kernel 6.8.
- update kni-fix-build-with-Linux-6.8.patch -- it is upstream now.

OBS-URL: https://build.opensuse.org/request/show/1187835
OBS-URL: https://build.opensuse.org/package/show/network/dpdk?expand=0&rev=156
2024-07-16 11:17:21 +00:00

46 lines
1.5 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From: Jiri Slaby <jslaby@suse.cz>
Date: Tue, 12 Mar 2024 09:49:14 +0100
Subject: kni: fix build with Linux 6.8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Git-repo: git://dpdk.org/dpdk-stable
Git-commit: 15658afda05f50e69805b891ebb4d2d5c1966d44
Patch-mainline: yes
References: kernel 6.8
strlcpy() was removed in commit d26270061ae6 (string: Remove strlcpy()), use
strscpy() instead.
The patches fixes this:
kernel/linux/kni/kni_net.c: In function kni_get_drvinfo:
kernel/linux/kni/kni_net.c:835:9: error: implicit declaration of function strlcpy; did you mean strscpy?
Intended esp. for stable/22.11. It should go wherever kni is still in
the tree.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Luca Boccassi <bluca@debian.org>
---
kernel/linux/kni/kni_net.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
index 779ee345..c115a728 100644
--- a/kernel/linux/kni/kni_net.c
+++ b/kernel/linux/kni/kni_net.c
@@ -832,8 +832,8 @@ static const struct net_device_ops kni_net_netdev_ops = {
static void kni_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *info)
{
- strlcpy(info->version, KNI_VERSION, sizeof(info->version));
- strlcpy(info->driver, "kni", sizeof(info->driver));
+ strscpy(info->version, KNI_VERSION, sizeof(info->version));
+ strscpy(info->driver, "kni", sizeof(info->driver));
}
static const struct ethtool_ops kni_net_ethtool_ops = {
--
2.45.2