mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-23 16:49:10 -07:00
sys-process/procenv: Fix call to undeclared function makedev
Closes: https://bugs.gentoo.org/898856 Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/31318 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
This commit is contained in:
committed by
Joonas Niilola
parent
27b40cc7f8
commit
c2d834070c
53
sys-process/procenv/files/procenv-0.51-musl-sysmacros.patch
Normal file
53
sys-process/procenv/files/procenv-0.51-musl-sysmacros.patch
Normal file
@@ -0,0 +1,53 @@
|
||||
https://github.com/jamesodhunt/procenv/pull/27
|
||||
From: Brahmajit Das <brahmajit.xyz@gmail.com>
|
||||
Date: Mon, 5 Jun 2023 14:10:48 +0000
|
||||
Subject: [PATCH] Fix build on musl libc
|
||||
|
||||
On util.c the guard around #include sys/sysmacros.h prevents musl libc
|
||||
from including the file, even though musl provides the header file, thus
|
||||
failing with errors such as "call to undeclared function makedev".
|
||||
|
||||
In procenv.c although the function makedev is used but the file
|
||||
sysmacros.h was never included, thus resulting in similar "call to
|
||||
undeclared function makedev" error hence moving inclusion sysmacros.h to
|
||||
source file from header file.
|
||||
|
||||
Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
|
||||
--- a/src/procenv.c
|
||||
+++ b/src/procenv.c
|
||||
@@ -27,6 +27,8 @@
|
||||
*/
|
||||
|
||||
#include <procenv.h>
|
||||
+/* major(3) / minor(3) */
|
||||
+#include <sys/sysmacros.h>
|
||||
|
||||
/**
|
||||
* doc:
|
||||
--- a/src/procenv.h
|
||||
+++ b/src/procenv.h
|
||||
@@ -103,9 +103,6 @@
|
||||
#define PACKAGE_STRING PACKAGE_NAME
|
||||
#endif
|
||||
|
||||
-/* major(3) / minor(3) */
|
||||
-#include <sys/sysmacros.h>
|
||||
-
|
||||
#endif /* PROCENV_PLATFORM_ANDROID */
|
||||
|
||||
/*********************************************************************/
|
||||
--- a/src/util.c
|
||||
+++ b/src/util.c
|
||||
@@ -17,9 +17,7 @@
|
||||
*/
|
||||
|
||||
#include "util.h"
|
||||
-#if __GLIBC__
|
||||
#include <sys/sysmacros.h>
|
||||
-#endif
|
||||
|
||||
// FIXME
|
||||
extern struct procenv_user user;
|
||||
--
|
||||
2.40.1
|
||||
|
||||
29
sys-process/procenv/procenv-0.51-r1.ebuild
Normal file
29
sys-process/procenv/procenv-0.51-r1.ebuild
Normal file
@@ -0,0 +1,29 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit autotools
|
||||
|
||||
DESCRIPTION="command-line utility to show process environment"
|
||||
HOMEPAGE="https://github.com/jamesodhunt/procenv"
|
||||
SRC_URI="https://github.com/jamesodhunt/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~hppa ~ppc64 ~x86"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
DEPEND="test? ( dev-libs/check )"
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-0.45-flags.patch
|
||||
"${FILESDIR}"/${PN}-0.51-musl-sysmacros.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
eautoreconf
|
||||
}
|
||||
Reference in New Issue
Block a user