public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-libs/udns/files/, net-libs/udns/
@ 2023-07-09  2:13 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2023-07-09  2:13 UTC (permalink / raw
  To: gentoo-commits

commit:     484780bbcbc5bbace9eebb4ed538760df7dd2343
Author:     Violet Purcell <vimproved <AT> inventati <DOT> org>
AuthorDate: Sat Jul  8 18:39:56 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jul  9 02:10:18 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=484780bb

net-libs/udns: Fix detection of inet_pton and inet_ntop with clang 16

Closes: https://bugs.gentoo.org/883285
Signed-off-by: Violet Purcell <vimproved <AT> inventati.org>
Closes: https://github.com/gentoo/gentoo/pull/31806
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../udns-0.4-configure-pton-ntop-clang16.patch     | 22 ++++++++++++++++++++++
 .../{udns-0.4-r1.ebuild => udns-0.4-r2.ebuild}     |  3 ++-
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/net-libs/udns/files/udns-0.4-configure-pton-ntop-clang16.patch b/net-libs/udns/files/udns-0.4-configure-pton-ntop-clang16.patch
new file mode 100644
index 000000000000..5eb0010092a8
--- /dev/null
+++ b/net-libs/udns/files/udns-0.4-configure-pton-ntop-clang16.patch
@@ -0,0 +1,22 @@
+Bug: https://bugs.gentoo.org/883285
+
+From e39b749619191226ccbf8730084c0d2dcadc9065 Mon Sep 17 00:00:00 2001
+From: Violet Purcell <vimproved@inventati.org>
+Date: Sat, 8 Jul 2023 18:34:11 +0000
+Subject: [PATCH] Fix detection of dns_pton and dns_ntop with clang 16
+
+--- a/configure
++++ b/configure
+@@ -94,7 +94,8 @@ int main() {
+   char buf[64];
+   long x = 0;
+   inet_pton(AF_INET, &x, buf);
+-  return inet_ntop(AF_INET, &x, buf, sizeof(buf));
++  inet_ntop(AF_INET, &x, buf, sizeof(buf));
++  return 0;
+ } 
+ EOF
+ 
+-- 
+2.41.0
+

diff --git a/net-libs/udns/udns-0.4-r1.ebuild b/net-libs/udns/udns-0.4-r2.ebuild
similarity index 90%
rename from net-libs/udns/udns-0.4-r1.ebuild
rename to net-libs/udns/udns-0.4-r2.ebuild
index f8f8c3675854..a963d2ac18b4 100644
--- a/net-libs/udns/udns-0.4-r1.ebuild
+++ b/net-libs/udns/udns-0.4-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -16,6 +16,7 @@ IUSE="ipv6 static +tools"
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-0.4-configure-clang16.patch
+	"${FILESDIR}"/${PN}-0.4-configure-pton-ntop-clang16.patch
 )
 
 src_configure() {


^ permalink raw reply related	[flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-libs/udns/files/, net-libs/udns/
@ 2023-12-16  8:24 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2023-12-16  8:24 UTC (permalink / raw
  To: gentoo-commits

commit:     fdc52315cd216a96a9956991d21f06348ef9de6e
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 16 08:11:10 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Dec 16 08:23:54 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fdc52315

net-libs/udns: fix (another) modern C issue

Bug: https://bugs.gentoo.org/874759
Bug: https://bugs.gentoo.org/883285
Closes: https://bugs.gentoo.org/919260
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-libs/udns/files/udns-0.4-configure-c99.patch | 33 +++++++++++++++++
 net-libs/udns/udns-0.4-r3.ebuild                 | 46 ++++++++++++++++++++++++
 2 files changed, 79 insertions(+)

diff --git a/net-libs/udns/files/udns-0.4-configure-c99.patch b/net-libs/udns/files/udns-0.4-configure-c99.patch
new file mode 100644
index 000000000000..cedf073fe0ff
--- /dev/null
+++ b/net-libs/udns/files/udns-0.4-configure-c99.patch
@@ -0,0 +1,33 @@
+https://bugs.gentoo.org/874759
+https://bugs.gentoo.org/883285
+https://bugs.gentoo.org/919260
+https://src.fedoraproject.org/rpms/udns/c/27e7b66faa416c13b113e895c204373596282c37?branch=rawhide
+
+Provide autoconf-style fake prototype for socket to avoid implicit
+function declarations.  Otherwise the check will always fail with soem
+C99 compilers.
+
+Avoid incorrect pointer types and a pointer-to-int conversion with
+inet_pton and inet_ntop.
+
+--- a/configure
++++ b/configure
+@@ -75,6 +75,7 @@ int main(int argc, char **argv) {
+ EOF
+ 
+ if ac_library_find_v 'socket and connect' "" "-lsocket -lnsl" <<EOF
++char socket(void); char connect(void);
+ int main() { socket(); connect(); return 0; }
+ EOF
+ then :
+@@ -92,8 +93,8 @@ ac_ign \
+ int main() {
+   char buf[64];
+   long x = 0;
+-  inet_pton(AF_INET, &x, buf);
+-  return inet_ntop(AF_INET, &x, buf, sizeof(buf));
++  inet_pton(AF_INET, (void *) &x, buf);
++  return inet_ntop(AF_INET, (void *) &x, buf, sizeof(buf)) != 0;
+ } 
+ EOF
+ 

diff --git a/net-libs/udns/udns-0.4-r3.ebuild b/net-libs/udns/udns-0.4-r3.ebuild
new file mode 100644
index 000000000000..76ee1d6bd4c5
--- /dev/null
+++ b/net-libs/udns/udns-0.4-r3.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo toolchain-funcs
+
+DESCRIPTION="Async-capable DNS stub resolver library"
+HOMEPAGE="http://www.corpit.ru/mjt/udns.html"
+SRC_URI="http://www.corpit.ru/mjt/udns/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="ipv6 static +tools"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.4-configure-c99.patch
+)
+
+src_configure() {
+	# Uses non-standard configure script, econf doesn't work
+	CC="$(tc-getCC)" edo ./configure $(use_enable ipv6)
+}
+
+src_compile() {
+	emake $(usex tools shared sharedlib)
+}
+
+src_install() {
+	dolib.so libudns.so.0
+	dosym libudns.so.0 /usr/$(get_libdir)/libudns.so
+
+	if use tools; then
+		newbin dnsget_s dnsget
+		newbin ex-rdns_s ex-rdns
+		newbin rblcheck_s rblcheck
+	fi
+
+	doheader udns.h
+
+	doman udns.3
+	use tools && doman dnsget.1 rblcheck.1
+
+	dodoc NEWS NOTES TODO
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-16  8:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-09  2:13 [gentoo-commits] repo/gentoo:master commit in: net-libs/udns/files/, net-libs/udns/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2023-12-16  8:24 Sam James

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