mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
app-admin/procinfo-ng: fix build w/ clang, -Wformat-security
It's a lazy fix but upstream is dead and surprisingly other distros still package this. Fix -Wformat-security while at it. Closes: https://bugs.gentoo.org/719790 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
--- a/procinfo.cpp
|
||||
+++ b/procinfo.cpp
|
||||
@@ -211,7 +211,7 @@ int mainLoop(bool perSecond, bool showTotals, bool showTotalsMem, bool fullScree
|
||||
try {
|
||||
rows = getNetStats(perSecond, showTotals, skipIfaces, elapsed);
|
||||
} catch (string exceptionMessage) {
|
||||
- print(exceptionMessage.c_str());
|
||||
+ print("%s", exceptionMessage.c_str());
|
||||
}
|
||||
print("\n");
|
||||
prettyPrint(rows, rowWidth, true);
|
||||
@@ -1,9 +1,9 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
EAPI=8
|
||||
|
||||
inherit autotools
|
||||
inherit autotools flag-o-matic
|
||||
|
||||
DESCRIPTION="Completely rewrite of the old system monitoring app procinfo"
|
||||
HOMEPAGE="https://sourceforge.net/projects/procinfo-ng/"
|
||||
@@ -13,17 +13,26 @@ LICENSE="|| ( GPL-2 LGPL-2.1 )"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~hppa x86"
|
||||
|
||||
RDEPEND="sys-libs/ncurses:0="
|
||||
RDEPEND="sys-libs/ncurses:="
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-autotools.patch
|
||||
"${FILESDIR}"/${P}-man.patch
|
||||
"${FILESDIR}"/${P}-wformat-security.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
mv configure.{in,ac} || die
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# bug #719790
|
||||
append-cxxflags -std=c++03
|
||||
|
||||
default
|
||||
}
|
||||
Reference in New Issue
Block a user