commit: 2d919a66527e930a44f58b2ae5e9193780e53234 Author: NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com> AuthorDate: Thu Feb 12 16:31:31 2026 +0000 Commit: Jaco Kroon <jkroon <AT> gentoo <DOT> org> CommitDate: Fri Feb 13 06:24:24 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d919a66
net-misc/astmanproxy: Port to C23 Forward declarations of structs and filled function pointer arguments Closes: https://bugs.gentoo.org/967014 Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com> Part-of: https://github.com/gentoo/gentoo/pull/45781 Closes: https://github.com/gentoo/gentoo/pull/45781 Signed-off-by: Jaco Kroon <jkroon <AT> gentoo.org> net-misc/astmanproxy/astmanproxy-1.30.0-r1.ebuild | 44 ++++++++++++++++++++++ .../astmanproxy/files/astmanproxy-1.30.0-C23.patch | 22 +++++++++++ 2 files changed, 66 insertions(+) diff --git a/net-misc/astmanproxy/astmanproxy-1.30.0-r1.ebuild b/net-misc/astmanproxy/astmanproxy-1.30.0-r1.ebuild new file mode 100644 index 000000000000..b791c895b405 --- /dev/null +++ b/net-misc/astmanproxy/astmanproxy-1.30.0-r1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="Proxy for the Asterisk manager interface" +HOMEPAGE="https://github.com/davies147/astmanproxy/" +SRC_URI="https://github.com/davies147/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +PATCHES=( + "${FILESDIR}"/${PN}-1.30.0-gentoo.patch + "${FILESDIR}"/${PN}-1.28.2-fno-common.patch + "${FILESDIR}"/${PN}-1.30.0-C23.patch +) + +src_prepare() { + default + + # Fix multilib + sed -i -e "s#/usr/lib/#/usr/$(get_libdir)/#" Makefile \ + || die "multilib sed failed" +} + +src_configure() { + tc-export CC +} + +src_install() { + dosbin astmanproxy + + dodoc -r samples + dodoc README.md VERSIONS + + insinto /etc/asterisk + doins configs/astmanproxy.{conf,users} + + newinitd "${FILESDIR}"/astmanproxy.rc6 astmanproxy +} diff --git a/net-misc/astmanproxy/files/astmanproxy-1.30.0-C23.patch b/net-misc/astmanproxy/files/astmanproxy-1.30.0-C23.patch new file mode 100644 index 000000000000..8a37bd67fac3 --- /dev/null +++ b/net-misc/astmanproxy/files/astmanproxy-1.30.0-C23.patch @@ -0,0 +1,22 @@ +Forward-declare structs and use them in function pointer declarations. +Fixes build with C23. +https://bugs.gentoo.org/967014 +--- a/src/include/astmanproxy.h ++++ b/src/include/astmanproxy.h +@@ -107,10 +107,13 @@ + char forcebanner[80]; /* override banner output in 'standard' protocol */ + }; + ++struct mansession; ++struct message; ++ + struct iohandler { +- int (*read) (); +- int (*write) (); +- int (*onconnect) (); ++ int (*read) (struct mansession *s, struct message *m); ++ int (*write) (struct mansession *s, struct message *m); ++ int (*onconnect) (struct mansession *s, struct message *m); + char formatname[80]; + void *dlhandle; + struct iohandler *next;
