mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2025-12-09 00:07:57 +03:00
sys-apps/ibm-powerpc-utils: fix build w/ c23, fix DEPEND
Closes: https://bugs.gentoo.org/955092 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
parent
b94e7b823c
commit
9825db4283
@ -0,0 +1,104 @@
|
||||
https://bugs.gentoo.org/955092
|
||||
https://github.com/ibm-power-utilities/powerpc-utils/issues/109
|
||||
https://github.com/ibm-power-utilities/powerpc-utils/pull/114
|
||||
|
||||
From 7834f565beca5fb765479c4639e34fa46759eb15 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Suchanek <msuchanek@suse.de>
|
||||
Date: Mon, 4 Aug 2025 13:11:00 +0200
|
||||
Subject: [PATCH 1/3] pseries_platform.h: Fix ifdef guard typo
|
||||
|
||||
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
|
||||
---
|
||||
src/common/pseries_platform.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/common/pseries_platform.h b/src/common/pseries_platform.h
|
||||
index 440c3e60..5fa12ff9 100644
|
||||
--- a/src/common/pseries_platform.h
|
||||
+++ b/src/common/pseries_platform.h
|
||||
@@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
#ifndef PLATFORM_H
|
||||
-#define PLARFORM_H
|
||||
+#define PLATFORM_H
|
||||
|
||||
#define PLATFORM_FILE "/proc/cpuinfo"
|
||||
|
||||
|
||||
From df4a683676a9826b048cd52509437fd128341a70 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Suchanek <msuchanek@suse.de>
|
||||
Date: Mon, 4 Aug 2025 13:25:38 +0200
|
||||
Subject: [PATCH 2/3] nvram.c: Correct librtas function prototypes
|
||||
|
||||
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
|
||||
---
|
||||
src/nvram.c | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/nvram.c b/src/nvram.c
|
||||
index 1987c3d9..45a61ebf 100644
|
||||
--- a/src/nvram.c
|
||||
+++ b/src/nvram.c
|
||||
@@ -886,6 +886,8 @@ dump_errlog(struct nvram *nvram)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+struct rtas_event;
|
||||
+
|
||||
/**
|
||||
* dump_rtas_event_entry
|
||||
* @brief Dump event-scan data.
|
||||
@@ -901,11 +903,11 @@ dump_errlog(struct nvram *nvram)
|
||||
int
|
||||
dump_rtas_event_entry(char *data, int len)
|
||||
{
|
||||
- void *rtas_event;
|
||||
+ struct rtas_event *rtas_event;
|
||||
void *handle;
|
||||
- void *(*parse_rtas_event)();
|
||||
- void (*rtas_print_event)();
|
||||
- void (*cleanup_rtas_event)();
|
||||
+ struct rtas_event *(*parse_rtas_event)(char *, int);
|
||||
+ int (*rtas_print_event)(FILE *, struct rtas_event *, int);
|
||||
+ int (*cleanup_rtas_event)(struct rtas_event *);
|
||||
|
||||
handle = dlopen("/usr/lib/librtasevent.so", RTLD_LAZY);
|
||||
if (handle == NULL)
|
||||
|
||||
From 3c147886126ac6c72776b99c043538c251a8703e Mon Sep 17 00:00:00 2001
|
||||
From: Michal Suchanek <msuchanek@suse.de>
|
||||
Date: Mon, 4 Nov 2024 11:39:06 +0100
|
||||
Subject: [PATCH 3/3] sys_ident: Quiet strncpy warning
|
||||
|
||||
The string is terminated by explicit NUL assignement below, use memcpy
|
||||
instead of strncpy.
|
||||
|
||||
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
|
||||
---
|
||||
src/sys_ident.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/sys_ident.c b/src/sys_ident.c
|
||||
index 2c5c06b4..0d88a2db 100644
|
||||
--- a/src/sys_ident.c
|
||||
+++ b/src/sys_ident.c
|
||||
@@ -364,7 +364,7 @@ print_sys_part_id(void)
|
||||
temp[2] = '\0';
|
||||
prefix = atoi(temp);
|
||||
|
||||
- strncpy(cc, sys_id+6, 2);
|
||||
+ memcpy(cc, sys_id+6, 2);
|
||||
cc[2] = '\0';
|
||||
|
||||
strncpy(sssss, sys_id+8, 5);
|
||||
@@ -386,7 +386,7 @@ print_sys_part_id(void)
|
||||
|
||||
close(fd);
|
||||
|
||||
- strncpy(tttt, model+4, 4);
|
||||
+ memcpy(tttt, model+4, 4);
|
||||
tttt[4] = '\0';
|
||||
|
||||
fd = open("/proc/device-tree/ibm,partition-no", O_RDONLY);
|
||||
|
||||
@ -0,0 +1,40 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit autotools systemd
|
||||
|
||||
DESCRIPTION="Utilities for the maintenance of the IBM and Apple PowerPC platforms"
|
||||
HOMEPAGE="https://github.com/ibm-power-utilities/powerpc-utils"
|
||||
SRC_URI="https://github.com/ibm-power-utilities/${PN//ibm-}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/${P//ibm-}"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~ppc ~ppc64"
|
||||
IUSE="+rtas"
|
||||
|
||||
RDEPEND="
|
||||
!<sys-apps/powerpc-utils-1.1.3.18-r4
|
||||
sys-process/numactl
|
||||
rtas? ( >=sys-libs/librtas-2.0.2 )
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.3.5-docdir.patch
|
||||
"${FILESDIR}"/${PN}-1.3.10-c23.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
--disable-werror \
|
||||
--with-systemd="$(systemd_get_systemunitdir)" \
|
||||
$(use_with rtas librtas)
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user