public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-libs/libndp/, net-libs/libndp/files/
@ 2024-11-11 10:28 Pacho Ramos
  0 siblings, 0 replies; only message in thread
From: Pacho Ramos @ 2024-11-11 10:28 UTC (permalink / raw
  To: gentoo-commits

commit:     5ef6e9bd3a715ac1248e2038bb02cf989e510b6a
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 11 10:27:10 2024 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Mon Nov 11 10:27:58 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ef6e9bd

net-libs/libndp: Fix building with gcc 14

Thanks-to: ernsteiswuerfel
Closes: https://bugs.gentoo.org/922613
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 net-libs/libndp/files/libndp-1.9-gcc14.patch | 63 ++++++++++++++++++++++++++++
 net-libs/libndp/libndp-1.9-r1.ebuild         | 30 +++++++++++++
 2 files changed, 93 insertions(+)

diff --git a/net-libs/libndp/files/libndp-1.9-gcc14.patch b/net-libs/libndp/files/libndp-1.9-gcc14.patch
new file mode 100644
index 000000000000..4c016015fba7
--- /dev/null
+++ b/net-libs/libndp/files/libndp-1.9-gcc14.patch
@@ -0,0 +1,63 @@
+From dfd70608a6a2ea164b18e7874de58ef6fd781cef Mon Sep 17 00:00:00 2001
+From: Solegaiter <159629996+Solegaiter@users.noreply.github.com>
+Date: Tue, 18 Jun 2024 17:11:12 +0200
+Subject: [PATCH] Patch libndp.c
+
+This patches a bug that made it impossible to compile on gentoo musl. This is my first patch.
+---
+ libndp/libndp.c | 37 +++++++++++++++++++++----------------
+ 1 file changed, 21 insertions(+), 16 deletions(-)
+
+diff --git a/libndp/libndp.c b/libndp/libndp.c
+index 72ec92e..8c57092 100644
+--- a/libndp/libndp.c
++++ b/libndp/libndp.c
+@@ -200,27 +200,32 @@ static int myrecvfrom6(int sockfd, void *buf, size_t *buflen, int flags,
+ }
+ 
+ static int mysendto6(int sockfd, void *buf, size_t buflen, int flags,
+-		     struct in6_addr *addr, uint32_t ifindex)
++                     struct in6_addr *addr, uint32_t ifindex)
+ {
+-	struct sockaddr_in6 sin6;
+-	ssize_t ret;
++        struct sockaddr_in6 sin6;
++        ssize_t ret;
++        memset(&sin6, 0, sizeof(sin6));
++
++        memcpy(&sin6.sin6_addr, addr, sizeof(sin6.sin6_addr));
++
++        sin6.sin6_scope_id = ifindex;
+ 
+-	memset(&sin6, 0, sizeof(sin6));
+-	memcpy(&sin6.sin6_addr, addr, sizeof(sin6.sin6_addr));
+-	sin6.sin6_scope_id = ifindex;
+ resend:
+-	ret = sendto(sockfd, buf, buflen, flags, &sin6, sizeof(sin6));
+-	if (ret == -1) {
+-		switch(errno) {
+-		case EINTR:
+-			goto resend;
+-		default:
+-			return -errno;
+-		}
+-	}
+-	return 0;
++        ret = sendto(sockfd, buf, buflen, flags, (const struct sockaddr *)&sin6, sizeof(sin6));
++
++        if (ret == -1) {
++                switch(errno) {
++                case EINTR:
++                        goto resend;
++                default:
++                        return -errno;
++                }
++        }
++
++        return 0;
+ }
+ 
++
+ static const char *str_in6_addr(struct in6_addr *addr, char buf[static INET6_ADDRSTRLEN])
+ {
+ 	return inet_ntop(AF_INET6, addr, buf, INET6_ADDRSTRLEN);

diff --git a/net-libs/libndp/libndp-1.9-r1.ebuild b/net-libs/libndp/libndp-1.9-r1.ebuild
new file mode 100644
index 000000000000..f4c71a816625
--- /dev/null
+++ b/net-libs/libndp/libndp-1.9-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit gnome2 multilib-minimal
+
+DESCRIPTION="Library for Neighbor Discovery Protocol"
+HOMEPAGE="http://libndp.org https://github.com/jpirko/libndp"
+SRC_URI="http://libndp.org/files/${P}.tar.gz"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+
+PATCHES=(
+	# https://github.com/jpirko/libndp/issues/25
+	"${FILESDIR}/${P}-gcc14.patch"
+)
+
+multilib_src_configure() {
+	ECONF_SOURCE="${S}" \
+	gnome2_src_configure \
+		--disable-static \
+		--enable-logging
+}
+
+multilib_src_install() {
+	gnome2_src_install
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-11-11 10:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-11 10:28 [gentoo-commits] repo/gentoo:master commit in: net-libs/libndp/, net-libs/libndp/files/ Pacho Ramos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox