diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2018-10-01 20:00:17 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2018-10-01 20:00:17 +0200 |
commit | 7e5d313104a13e24ef704f176618dcb63dc87209 (patch) | |
tree | 289f97ef7c71372510622acd10a5a86364006a36 /net-misc/iputils | |
parent | mail-client/thunderbird: subscribe to virtual/libffi sub slot (diff) | |
download | gentoo-7e5d313104a13e24ef704f176618dcb63dc87209.tar.gz gentoo-7e5d313104a13e24ef704f176618dcb63dc87209.tar.bz2 gentoo-7e5d313104a13e24ef704f176618dcb63dc87209.zip |
net-misc/iputils: fix build on musl when USE=-idn
Closes: https://bugs.gentoo.org/665164
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Package-Manager: Portage-2.3.50, Repoman-2.3.11
Diffstat (limited to 'net-misc/iputils')
-rw-r--r-- | net-misc/iputils/files/iputils-20180629-fix-ping-on-musl.patch | 54 | ||||
-rw-r--r-- | net-misc/iputils/iputils-20180629.ebuild | 3 |
2 files changed, 56 insertions, 1 deletions
diff --git a/net-misc/iputils/files/iputils-20180629-fix-ping-on-musl.patch b/net-misc/iputils/files/iputils-20180629-fix-ping-on-musl.patch new file mode 100644 index 000000000000..8d8160a3d4af --- /dev/null +++ b/net-misc/iputils/files/iputils-20180629-fix-ping-on-musl.patch @@ -0,0 +1,54 @@ +From 25899e849aa3abc1ad29ebf0b830262a859eaed5 Mon Sep 17 00:00:00 2001 +From: Petr Vorel <petr.vorel@gmail.com> +Date: Sat, 21 Jul 2018 17:46:14 +0200 +Subject: [PATCH] ping: Fix AI_CANONIDN usage on some systems + +Commit 99f67db used AI_CANONIDN in a way, which broke compilation on +systems where AI_CANONIDN is not defined in netdb.h (e.g. glibc < 2.3.4, +alternative libcs that don't support IDN: e.g. current musl 1.1.19 and +uClibc-ng 1.0.30) when not using the system libidn2. + +Fixes: 99f67db ping: Fix ping name encoded using ACE on C locale + +Reported-by: Nicholas Fish +Signed-off-by: Petr Vorel <petr.vorel@gmail.com> +--- + ping.c | 2 +- + ping.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ping.c b/ping.c +index 733477f..b241815 100644 +--- a/ping.c ++++ b/ping.c +@@ -207,9 +207,9 @@ main(int argc, char **argv) + + #ifdef USE_IDN + setlocale(LC_ALL, ""); +-#endif + if (!strcmp(setlocale(LC_ALL, NULL), "C")) + hints.ai_flags &= ~ AI_CANONIDN; ++#endif + + /* Support being called using `ping4` or `ping6` symlinks */ + if (argv[0][strlen(argv[0])-1] == '4') +diff --git a/ping.h b/ping.h +index 3e09685..8a0c4ef 100644 +--- a/ping.h ++++ b/ping.h +@@ -28,7 +28,6 @@ + #include <netinet/icmp6.h> + #include <linux/filter.h> + #include <resolv.h> +-#include <locale.h> + + #ifdef CAPABILITIES + #include <sys/prctl.h> +@@ -36,6 +35,7 @@ + #endif + + #ifdef USE_IDN ++#include <locale.h> + #include <idn2.h> + #define getaddrinfo_flags (AI_CANONNAME | AI_IDN | AI_CANONIDN) + #define getnameinfo_flags NI_IDN diff --git a/net-misc/iputils/iputils-20180629.ebuild b/net-misc/iputils/iputils-20180629.ebuild index fb577b0efbb1..98e13d04e31d 100644 --- a/net-misc/iputils/iputils-20180629.ebuild +++ b/net-misc/iputils/iputils-20180629.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # For released versions, we precompile the man/html pages and store @@ -15,6 +15,7 @@ MY_PV="${PV/_pre/}" PATCHES=( "${FILESDIR}"/${PN}-20180629-musl.patch + "${FILESDIR}"/${P}-fix-ping-on-musl.patch ) if [[ ${PV} == "99999999" ]] ; then |