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)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4386D158064 for ; Sun, 12 May 2024 16:02:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6D78BE2AB5; Sun, 12 May 2024 16:02:21 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 58228E2AB5 for ; Sun, 12 May 2024 16:02:21 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 973893430C7 for ; Sun, 12 May 2024 16:02:20 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0EB89132F for ; Sun, 12 May 2024 16:02:19 +0000 (UTC) From: "James Le Cuirot" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "James Le Cuirot" Message-ID: <1715529657.6a29d4138555d7ae5af4d024c9ff9b8d4541b13b.chewi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/weston/, dev-libs/weston/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/weston/files/weston-musl-basename.patch dev-libs/weston/weston-13.0.1.ebuild X-VCS-Directories: dev-libs/weston/files/ dev-libs/weston/ X-VCS-Committer: chewi X-VCS-Committer-Name: James Le Cuirot X-VCS-Revision: 6a29d4138555d7ae5af4d024c9ff9b8d4541b13b X-VCS-Branch: master Date: Sun, 12 May 2024 16:02:19 +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: e01d3f1b-4fa6-43aa-bc9d-b1c604f4edb7 X-Archives-Hash: 6e2bc118a063d1c8022a99306f673604 commit: 6a29d4138555d7ae5af4d024c9ff9b8d4541b13b Author: Haelwenn (lanodan) Monnier hacktivis me> AuthorDate: Thu May 9 11:40:32 2024 +0000 Commit: James Le Cuirot gentoo org> CommitDate: Sun May 12 16:00:57 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a29d413 dev-libs/weston: Fix building with musl 1.2.5 (missing libgen.h) Signed-off-by: Haelwenn (lanodan) Monnier hacktivis.me> Closes: https://github.com/gentoo/gentoo/pull/36615 Signed-off-by: James Le Cuirot gentoo.org> dev-libs/weston/files/weston-musl-basename.patch | 73 ++++++++++++++++++++++++ dev-libs/weston/weston-13.0.1.ebuild | 1 + 2 files changed, 74 insertions(+) diff --git a/dev-libs/weston/files/weston-musl-basename.patch b/dev-libs/weston/files/weston-musl-basename.patch new file mode 100644 index 000000000000..57b91331055f --- /dev/null +++ b/dev-libs/weston/files/weston-musl-basename.patch @@ -0,0 +1,73 @@ +From dbd134ca5a3c639819c6fd503de7e2c72762ada0 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 14 Dec 2023 09:13:54 -0800 +Subject: [PATCH] libweston,tools: Include libgen.h for basename signature +Upstream: https://gitlab.freedesktop.org/wayland/weston/-/commit/dbd134ca5a3c639819c6fd503de7e2c72762ada0 +Upstream-Status: Merged in main branch + +Latest musl has removed the declaration from string.h [1] as it only +implements POSIX version alone and string.h in glibc implements GNU +version of basename. This now results in compile errors on musl. + +This might be a warning with older compilers but it is error with +Clang-17+ as it treats -Wimplicit-function-declaration as error + +Switch the use in backlight_init function to use POSIX version + +[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 + +Signed-off-by: Khem Raj +--- + libweston/backend-drm/libbacklight.c | 8 +++++--- + tools/zunitc/src/zunitc_impl.c | 1 + + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/libweston/backend-drm/libbacklight.c b/libweston/backend-drm/libbacklight.c +index ca7f2d6806..973d15ff8c 100644 +--- a/libweston/backend-drm/libbacklight.c ++++ b/libweston/backend-drm/libbacklight.c +@@ -41,6 +41,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -167,7 +168,7 @@ struct backlight *backlight_init(struct udev_device *drm_device, + DIR *backlights = NULL; + struct dirent *entry; + enum backlight_type type = 0; +- char buffer[100]; ++ char buffer[100], basename_buffer[100]; + struct backlight *backlight = NULL; + int ret; + +@@ -186,9 +187,10 @@ struct backlight *backlight_init(struct udev_device *drm_device, + free(path); + if (ret < 0) + return NULL; +- ++ strncpy(basename_buffer, buffer, ret); + buffer[ret] = '\0'; +- pci_name = basename(buffer); ++ basename_buffer[ret] = '\0'; ++ pci_name = basename(basename_buffer); + + if (connector_type <= 0) + return NULL; +diff --git a/tools/zunitc/src/zunitc_impl.c b/tools/zunitc/src/zunitc_impl.c +index 18f030158e..9b460fa03b 100644 +--- a/tools/zunitc/src/zunitc_impl.c ++++ b/tools/zunitc/src/zunitc_impl.c +@@ -27,6 +27,7 @@ + + #include + #include ++#include + #include + #include + #include +-- +GitLab + diff --git a/dev-libs/weston/weston-13.0.1.ebuild b/dev-libs/weston/weston-13.0.1.ebuild index 40b3bd77eef2..801ef005cb3b 100644 --- a/dev-libs/weston/weston-13.0.1.ebuild +++ b/dev-libs/weston/weston-13.0.1.ebuild @@ -95,6 +95,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-neatvnc-0.8.patch + "${FILESDIR}"/${PN}-musl-basename.patch ) python_check_deps() {