From 4c0166edf28e7359be5d1057a9cf5a7415b42653 Mon Sep 17 00:00:00 2001 From: Thomas Deutschmann Date: Sun, 29 Oct 2017 23:25:38 +0100 Subject: net-misc/iputils: Fix build issue on MUSL Closes: https://bugs.gentoo.org/503914 Package-Manager: Portage-2.3.13, Repoman-2.3.4 --- net-misc/iputils/files/iputils-99999999-musl.patch | 92 ++++++++++++++++++++++ net-misc/iputils/iputils-20171016_pre.ebuild | 5 +- net-misc/iputils/iputils-99999999.ebuild | 5 +- 3 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 net-misc/iputils/files/iputils-99999999-musl.patch (limited to 'net-misc/iputils') diff --git a/net-misc/iputils/files/iputils-99999999-musl.patch b/net-misc/iputils/files/iputils-99999999-musl.patch new file mode 100644 index 000000000000..167e7fabca70 --- /dev/null +++ b/net-misc/iputils/files/iputils-99999999-musl.patch @@ -0,0 +1,92 @@ +From 58ed671d1003caf32f3c35260531e8e1cd7efb80 Mon Sep 17 00:00:00 2001 +From: Aric Belsito +Date: Sun, 29 Oct 2017 23:17:03 +0100 +Subject: [PATCH] Fix build on MUSL + +Add missing AI_IDN and NI_IDN declarations. + +Bug: https://bugs.gentoo.org/503914 +--- + arping.c | 7 +++++++ + ping.h | 11 +++++++++++ + tracepath.c | 8 ++++++++ + traceroute6.c | 4 ++++ + 4 files changed, 30 insertions(+) + +diff --git a/arping.c b/arping.c +index 0ac18cd..5d2145e 100644 +--- a/arping.c ++++ b/arping.c +@@ -45,6 +45,13 @@ + #ifdef USE_IDN + #include + #include ++ ++#ifndef AI_IDN ++#define AI_IDN 0x0040 ++#endif ++#ifndef AI_CANONIDN ++#define AI_CANONIDN 0x0080 ++#endif + #endif + + #include "SNAPSHOT.h" +diff --git a/ping.h b/ping.h +index c5f0321..0391de0 100644 +--- a/ping.h ++++ b/ping.h +@@ -38,6 +38,17 @@ + #include + #include + #include ++ ++#ifndef AI_IDN ++#define AI_IDN 0x0040 ++#endif ++#ifndef AI_CANONIDN ++#define AI_CANONIDN 0x0080 ++#endif ++#ifndef NI_IDN ++#define NI_IDN 32 ++#endif ++ + #define getaddrinfo_flags (AI_CANONNAME | AI_IDN | AI_CANONIDN) + #define getnameinfo_flags NI_IDN + #else +diff --git a/tracepath.c b/tracepath.c +index b0eb911..c50e3ec 100644 +--- a/tracepath.c ++++ b/tracepath.c +@@ -30,6 +30,14 @@ + #ifdef USE_IDN + #include + #include ++ ++#ifndef AI_IDN ++#define AI_IDN 0x0040 ++#endif ++#ifndef NI_IDN ++#define NI_IDN 32 ++#endif ++ + #define getnameinfo_flags NI_IDN + #else + #define getnameinfo_flags 0 +diff --git a/traceroute6.c b/traceroute6.c +index 7807956..c6d868a 100644 +--- a/traceroute6.c ++++ b/traceroute6.c +@@ -247,6 +247,10 @@ + #include + #include + ++#ifndef NI_IDN ++#define NI_IDN 32 ++#endif ++ + #define getnameinfo_flags NI_IDN + #else + #define getnameinfo_flags 0 +-- +2.14.3 + diff --git a/net-misc/iputils/iputils-20171016_pre.ebuild b/net-misc/iputils/iputils-20171016_pre.ebuild index 691040d27e10..fb555325457d 100644 --- a/net-misc/iputils/iputils-20171016_pre.ebuild +++ b/net-misc/iputils/iputils-20171016_pre.ebuild @@ -13,7 +13,10 @@ inherit flag-o-matic toolchain-funcs fcaps MY_COMMIT="67e7d0daf1f231cc708217e6aec2f8d5ce7aeacf" -PATCHES=( "${FILESDIR}"/${PN}-99999999-tracepath46.patch ) +PATCHES=( + "${FILESDIR}"/${PN}-99999999-tracepath46.patch + "${FILESDIR}"/${PN}-99999999-musl.patch +) if [[ ${PV} == "99999999" ]] ; then EGIT_REPO_URI="https://github.com/iputils/iputils.git" diff --git a/net-misc/iputils/iputils-99999999.ebuild b/net-misc/iputils/iputils-99999999.ebuild index 9731575e02e3..90fcf7f7d8a0 100644 --- a/net-misc/iputils/iputils-99999999.ebuild +++ b/net-misc/iputils/iputils-99999999.ebuild @@ -11,7 +11,10 @@ EAPI="6" inherit flag-o-matic toolchain-funcs fcaps -PATCHES=( "${FILESDIR}"/${PN}-99999999-tracepath46.patch ) +PATCHES=( + "${FILESDIR}"/${PN}-99999999-tracepath46.patch + "${FILESDIR}"/${PN}-99999999-musl.patch +) if [[ ${PV} == "99999999" ]] ; then EGIT_REPO_URI="https://github.com/iputils/iputils.git" -- cgit v1.2.3-65-gdbad