From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E0553158041 for ; Fri, 29 Mar 2024 13:55:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 075082BC015; Fri, 29 Mar 2024 13:55:41 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D82832BC015 for ; Fri, 29 Mar 2024 13:55:40 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DF44133BDFF for ; Fri, 29 Mar 2024 13:55:39 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4F3AFFA8 for ; Fri, 29 Mar 2024 13:55:38 +0000 (UTC) From: "Joonas Niilola" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Joonas Niilola" Message-ID: <1711720482.458ac56c274e347c83fc5b87ea376fc1b57ef3a2.juippis@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/r8152/, net-misc/r8152/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-misc/r8152/files/r8152-2.17.1-kernel-6.8-strscpy.patch net-misc/r8152/r8152-2.17.1.ebuild X-VCS-Directories: net-misc/r8152/files/ net-misc/r8152/ X-VCS-Committer: juippis X-VCS-Committer-Name: Joonas Niilola X-VCS-Revision: 458ac56c274e347c83fc5b87ea376fc1b57ef3a2 X-VCS-Branch: master Date: Fri, 29 Mar 2024 13:55:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 938224b2-af70-448e-a116-30876ca65460 X-Archives-Hash: 602bb43ca086b8cd4b9f4c9b0191340e commit: 458ac56c274e347c83fc5b87ea376fc1b57ef3a2 Author: Jay Faulkner jvf cc> AuthorDate: Mon Mar 25 22:34:35 2024 +0000 Commit: Joonas Niilola gentoo org> CommitDate: Fri Mar 29 13:54:42 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=458ac56c net-misc/r8152: fix bug 926829; build on kernel >=6.8 Imports patch from bug 926829 to fix build issues on linux kernels 6.8 or newer. Closes: https://bugs.gentoo.org/926829 Signed-off-by: Jay Faulkner jvf.cc> Signed-off-by: Joonas Niilola gentoo.org> .../files/r8152-2.17.1-kernel-6.8-strscpy.patch | 32 ++++++++++++++++++++++ net-misc/r8152/r8152-2.17.1.ebuild | 3 +- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/net-misc/r8152/files/r8152-2.17.1-kernel-6.8-strscpy.patch b/net-misc/r8152/files/r8152-2.17.1-kernel-6.8-strscpy.patch new file mode 100644 index 000000000000..2449d2883346 --- /dev/null +++ b/net-misc/r8152/files/r8152-2.17.1-kernel-6.8-strscpy.patch @@ -0,0 +1,32 @@ +Bug: https://bugs.gentoo.org/926829 +Patch from Christian Bricart to remove strlcpy and replace with strscpy +so this builds with linux kernels =>6.8. + +Signed-Off-By: Jay Faulkner + +diff -Naur r8152-2.17.1/compatibility.h r8152-2.17.1.patched/compatibility.h +--- r8152-2.17.1/compatibility.h 2024-03-12 09:43:05.150688533 +0100 ++++ r8152-2.17.1.patched/compatibility.h 2024-03-12 09:46:20.913759268 +0100 +@@ -18,6 +18,10 @@ + #include + #endif + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) ++#define strscpy strlcpy ++#endif ++ + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) + #include + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) +diff -Naur r8152-2.17.1/r8152.c r8152-2.17.1.patched/r8152.c +--- r8152-2.17.1/r8152.c 2024-03-12 09:43:05.130688336 +0100 ++++ r8152-2.17.1.patched/r8152.c 2024-03-12 09:45:13.264694513 +0100 +@@ -19691,7 +19691,7 @@ + uinfo->idVendor = __le16_to_cpu(udev->descriptor.idVendor); + uinfo->idProduct = __le16_to_cpu(udev->descriptor.idProduct); + uinfo->bcdDevice = __le16_to_cpu(udev->descriptor.bcdDevice); +- strlcpy(uinfo->devpath, udev->devpath, sizeof(udev->devpath)); ++ strscpy(uinfo->devpath, udev->devpath, sizeof(udev->devpath)); + pla_ocp_read(tp, PLA_IDR, sizeof(uinfo->dev_addr), + uinfo->dev_addr); + diff --git a/net-misc/r8152/r8152-2.17.1.ebuild b/net-misc/r8152/r8152-2.17.1.ebuild index 7d3f7b0a6e6e..992571ed39c9 100644 --- a/net-misc/r8152/r8152-2.17.1.ebuild +++ b/net-misc/r8152/r8152-2.17.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -23,6 +23,7 @@ IUSE="+center-tap-short" PATCHES=( "${FILESDIR}"/${PN}-2.16.3-kernel-6.4.10-fix.patch "${FILESDIR}"/${PN}-2.16.3-asus-c5000-support.patch + "${FILESDIR}"/${PN}-2.17.1-kernel-6.8-strscpy.patch ) src_compile() {