diff options
author | Sam James <sam@gentoo.org> | 2022-12-30 04:46:15 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-12-30 04:50:46 +0000 |
commit | 358a7757b4c68cd58ed9b51de11e3bdbcf0e5780 (patch) | |
tree | 0847c878b91e306e701b7d215bd082e375ac9f02 /net-libs/udns | |
parent | gui-wm/sway: move xcb-util-wm dep under the X flag (diff) | |
download | gentoo-358a7757b4c68cd58ed9b51de11e3bdbcf0e5780.tar.gz gentoo-358a7757b4c68cd58ed9b51de11e3bdbcf0e5780.tar.bz2 gentoo-358a7757b4c68cd58ed9b51de11e3bdbcf0e5780.zip |
net-libs/udns: fix build w/ clang 16
Closes: https://bugs.gentoo.org/874759
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-libs/udns')
-rw-r--r-- | net-libs/udns/files/udns-0.4-configure-clang16.patch | 24 | ||||
-rw-r--r-- | net-libs/udns/udns-0.4-r1.ebuild (renamed from net-libs/udns/udns-0.4.ebuild) | 10 |
2 files changed, 31 insertions, 3 deletions
diff --git a/net-libs/udns/files/udns-0.4-configure-clang16.patch b/net-libs/udns/files/udns-0.4-configure-clang16.patch new file mode 100644 index 000000000000..6b2dcda26ca0 --- /dev/null +++ b/net-libs/udns/files/udns-0.4-configure-clang16.patch @@ -0,0 +1,24 @@ +https://bugs.gentoo.org/874759 +--- a/configure ++++ b/configure +@@ -65,9 +65,9 @@ ac_prog_ranlib_v + + ac_ign ac_yesno "for getopt()" ac_have GETOPT ac_link <<EOF + #include <stdio.h> ++#include <unistd.h> + extern int optind; + extern char *optarg; +-extern int getopt(int, char **, char *); + int main(int argc, char **argv) { + getopt(argc, argv, "abc"); + return optarg ? optind : 0; +@@ -75,7 +75,8 @@ int main(int argc, char **argv) { + EOF + + if ac_library_find_v 'socket and connect' "" "-lsocket -lnsl" <<EOF +-int main() { socket(); connect(); return 0; } ++#include <sys/socket.h> ++int main() { socket(0, 0, 0); connect(0, 0, 0); return 0; } + EOF + then : + else diff --git a/net-libs/udns/udns-0.4.ebuild b/net-libs/udns/udns-0.4-r1.ebuild index da981b2165e9..f8f8c3675854 100644 --- a/net-libs/udns/udns-0.4.ebuild +++ b/net-libs/udns/udns-0.4-r1.ebuild @@ -1,9 +1,9 @@ # Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -inherit toolchain-funcs +inherit edo toolchain-funcs DESCRIPTION="Async-capable DNS stub resolver library" HOMEPAGE="http://www.corpit.ru/mjt/udns.html" @@ -14,9 +14,13 @@ SLOT="0" KEYWORDS="amd64 ~hppa ppc ~ppc64 sparc x86" IUSE="ipv6 static +tools" +PATCHES=( + "${FILESDIR}"/${PN}-0.4-configure-clang16.patch +) + src_configure() { # Uses non-standard configure script, econf doesn't work - CC="$(tc-getCC)" ./configure $(use_enable ipv6) || die "Configure failed" + CC="$(tc-getCC)" edo ./configure $(use_enable ipv6) } src_compile() { |