commit: ef8f76b010eda8e831e3e6c3c9da76e6f390fb7e Author: Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org> AuthorDate: Sun Dec 14 13:55:33 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Dec 18 08:35:04 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef8f76b0
net-analyzer/dhcp_probe: fix build with gcc 15 Closes: https://bugs.gentoo.org/945196 Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org> Part-of: https://github.com/gentoo/gentoo/pull/45024 Signed-off-by: Sam James <sam <AT> gentoo.org> net-analyzer/dhcp_probe/dhcp_probe-1.3.1-r1.ebuild | 50 ++++++++++++++++++++++ .../dhcp_probe/files/dhcp_probe-1.3.1-gcc15.patch | 14 ++++++ 2 files changed, 64 insertions(+) diff --git a/net-analyzer/dhcp_probe/dhcp_probe-1.3.1-r1.ebuild b/net-analyzer/dhcp_probe/dhcp_probe-1.3.1-r1.ebuild new file mode 100644 index 000000000000..4ccf2d977a28 --- /dev/null +++ b/net-analyzer/dhcp_probe/dhcp_probe-1.3.1-r1.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic toolchain-funcs + +DESCRIPTION="Discover DHCP and BootP servers on a directly-attached Ethernet network" +HOMEPAGE="https://www.net.princeton.edu/software/dhcp_probe/" +SRC_URI="https://www.net.princeton.edu/software/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND=" + net-libs/libnet + net-libs/libpcap" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-1.3.1-respect-AR.patch + "${FILESDIR}"/${PN}-1.3.1-fix-configure-CPP.patch + "${FILESDIR}"/${PN}-1.3.1-gcc15.patch +) + +src_prepare() { + default + + # for AR patch + eautoreconf +} + +src_configure() { + # configure uses CPP + tc-export CPP + + use amd64 && append-cppflags -D__ARCH__=64 + + STRIP=true econf +} + +src_install() { + default + + dodoc extras/dhcp_probe.cf.sample "${FILESDIR}"/${PN}_mail + + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} +} diff --git a/net-analyzer/dhcp_probe/files/dhcp_probe-1.3.1-gcc15.patch b/net-analyzer/dhcp_probe/files/dhcp_probe-1.3.1-gcc15.patch new file mode 100644 index 000000000000..30ef8ab179f1 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/dhcp_probe-1.3.1-gcc15.patch @@ -0,0 +1,14 @@ +Fix build with GCC 15 +https://bugs.gentoo.org/945196 + +--- a/src/report.c ++++ b/src/report.c +@@ -253,8 +253,6 @@ get_errmsg() + { + /* Return pointer to static string which gives full filesystem error message. + */ +- extern int errno; +- extern char *strerror(); + + return strerror(errno); + }
