commit:     13440743af372d2bae9a2af91bc1a39f2f934179
Author:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 21 23:23:42 2025 +0000
Commit:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
CommitDate: Thu Aug 21 23:24:09 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13440743

x11-plugins/wmbattery: fix LTO build

Closes: https://bugs.gentoo.org/961823
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>

 x11-plugins/wmbattery/files/wmbattery-2.56-lto.patch | 12 ++++++++++++
 x11-plugins/wmbattery/wmbattery-2.56.ebuild          |  3 ++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/x11-plugins/wmbattery/files/wmbattery-2.56-lto.patch 
b/x11-plugins/wmbattery/files/wmbattery-2.56-lto.patch
new file mode 100644
index 000000000000..cf7d21a41e02
--- /dev/null
+++ b/x11-plugins/wmbattery/files/wmbattery-2.56-lto.patch
@@ -0,0 +1,12 @@
+diff -Naur wmbattery-2.56.orig/sonypi.c wmbattery-2.56/sonypi.c
+--- wmbattery-2.56.orig/sonypi.c       2022-06-03 21:22:12.000000000 +0200
++++ wmbattery-2.56/sonypi.c    2025-08-22 01:21:59.483780914 +0200
+@@ -24,7 +24,7 @@
+               return 1;
+ }
+ 
+-inline int sonypi_ioctl(int ioctlno, void *param)
++static int sonypi_ioctl(int ioctlno, void *param)
+ {
+       if (ioctl(spicfd, ioctlno, param) < 0)
+               return 0;

diff --git a/x11-plugins/wmbattery/wmbattery-2.56.ebuild 
b/x11-plugins/wmbattery/wmbattery-2.56.ebuild
index e9589452647d..1af304ee34c8 100644
--- a/x11-plugins/wmbattery/wmbattery-2.56.ebuild
+++ b/x11-plugins/wmbattery/wmbattery-2.56.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -20,6 +20,7 @@ RDEPEND="apm? ( sys-apps/apmd )
 DEPEND="${RDEPEND}"
 BDEPEND="virtual/pkgconfig"
 
+PATCHES=( "${FILESDIR}"/${P}-lto.patch )
 DOCS=( ChangeLog README TODO )
 
 src_configure() {

Reply via email to