From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4717E138350 for ; Thu, 2 Apr 2020 20:01:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 87D5EE0874; Thu, 2 Apr 2020 20:01:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 58D07E0874 for ; Thu, 2 Apr 2020 20:01:34 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C6BB834EFAC for ; Thu, 2 Apr 2020 20:01:32 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BB1FC18B for ; Thu, 2 Apr 2020 20:01:30 +0000 (UTC) From: "Lars Wendler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" Message-ID: <1585857671.12089270c7adad9ec6cbffb031e27fa66e953383.polynomial-c@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/dhcpcd/, net-misc/dhcpcd/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-misc/dhcpcd/dhcpcd-9.0.0.ebuild net-misc/dhcpcd/files/dhcpcd-9.0.0-no_ipv6_build_fix.patch X-VCS-Directories: net-misc/dhcpcd/ net-misc/dhcpcd/files/ X-VCS-Committer: polynomial-c X-VCS-Committer-Name: Lars Wendler X-VCS-Revision: 12089270c7adad9ec6cbffb031e27fa66e953383 X-VCS-Branch: master Date: Thu, 2 Apr 2020 20:01:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a33fc55f-9302-4fad-a0d4-9eab141c8677 X-Archives-Hash: 3171fdd0720157069e9535e8d5e011fe commit: 12089270c7adad9ec6cbffb031e27fa66e953383 Author: Lars Wendler gentoo org> AuthorDate: Thu Apr 2 20:01:11 2020 +0000 Commit: Lars Wendler gentoo org> CommitDate: Thu Apr 2 20:01:11 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12089270 net-misc/dhcpcd: Fixed build with USE="-ipv6" Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Lars Wendler gentoo.org> net-misc/dhcpcd/dhcpcd-9.0.0.ebuild | 2 + .../files/dhcpcd-9.0.0-no_ipv6_build_fix.patch | 92 ++++++++++++++++++++++ 2 files changed, 94 insertions(+) diff --git a/net-misc/dhcpcd/dhcpcd-9.0.0.ebuild b/net-misc/dhcpcd/dhcpcd-9.0.0.ebuild index 9656eabee92..52553bf20cc 100644 --- a/net-misc/dhcpcd/dhcpcd-9.0.0.ebuild +++ b/net-misc/dhcpcd/dhcpcd-9.0.0.ebuild @@ -33,6 +33,8 @@ RDEPEND=" ) " +PATCHES=( "${FILESDIR}/${P}-no_ipv6_build_fix.patch" ) + src_configure() { local myeconfargs=( --dbdir="${EPREFIX}/var/lib/dhcpcd" diff --git a/net-misc/dhcpcd/files/dhcpcd-9.0.0-no_ipv6_build_fix.patch b/net-misc/dhcpcd/files/dhcpcd-9.0.0-no_ipv6_build_fix.patch new file mode 100644 index 00000000000..a210982c340 --- /dev/null +++ b/net-misc/dhcpcd/files/dhcpcd-9.0.0-no_ipv6_build_fix.patch @@ -0,0 +1,92 @@ +From 12ddbee51f0e1cf4372146f8d42ea404dd07dba3 Mon Sep 17 00:00:00 2001 +From: Roy Marples +Date: Thu, 2 Apr 2020 19:54:19 +0000 +Subject: Fix build without INET or INET6 + +--- + src/dhcpcd.c | 2 +- + src/if-bsd.c | 2 ++ + src/if-options.c | 6 ++++++ + src/privsep-root.c | 2 ++ + 4 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/src/dhcpcd.c b/src/dhcpcd.c +index 057a1fd9..9208f37c 100644 +--- a/src/dhcpcd.c ++++ b/src/dhcpcd.c +@@ -2169,7 +2169,7 @@ printpidfile: + } + #endif + +-#ifdef BSD ++#if defined(BSD) && defined(INET6) + /* Disable the kernel RTADV sysctl as early as possible. */ + if (ctx.options & DHCPCD_IPV6 && ctx.options & DHCPCD_IPV6RS) + if_disable_rtadv(); +diff --git a/src/if-bsd.c b/src/if-bsd.c +index dbe5c359..d6c38903 100644 +--- a/src/if-bsd.c ++++ b/src/if-bsd.c +@@ -1524,6 +1524,8 @@ if_missfilter0(struct dhcpcd_ctx *ctx, struct interface *ifp, + #ifdef INET6 + if (sa->sa_family == AF_INET6) + ifa_setscope(satosin6(sa), ifp->index); ++#else ++ UNUSED(ifp); + #endif + + cp = ctx->rt_missfilter + ctx->rt_missfilterlen; +diff --git a/src/if-options.c b/src/if-options.c +index 7850ff2e..1280cfbd 100644 +--- a/src/if-options.c ++++ b/src/if-options.c +@@ -573,6 +573,8 @@ set_option_space(struct dhcpcd_ctx *ctx, + return; + } + #endif ++#else ++ UNUSED(arg); + #endif + + #ifdef INET +@@ -1275,6 +1277,7 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo, + memset(ifo->nomask6, 0xff, sizeof(ifo->nomask6)); + + /* Allow the bare minimum through */ ++#ifdef INET + del_option_mask(ifo->nomask, DHO_SUBNETMASK); + del_option_mask(ifo->nomask, DHO_CSR); + del_option_mask(ifo->nomask, DHO_ROUTER); +@@ -1286,11 +1289,14 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo, + del_option_mask(ifo->nomask, DHO_RENEWALTIME); + del_option_mask(ifo->nomask, DHO_REBINDTIME); + del_option_mask(ifo->nomask, DHO_DNSSEARCH); ++#endif + ++#ifdef INET6 + del_option_mask(ifo->nomask6, D6_OPTION_DNS_SERVERS); + del_option_mask(ifo->nomask6, D6_OPTION_DOMAIN_LIST); + del_option_mask(ifo->nomask6, D6_OPTION_SOL_MAX_RT); + del_option_mask(ifo->nomask6, D6_OPTION_INF_MAX_RT); ++#endif + + break; + #ifdef INET +diff --git a/src/privsep-root.c b/src/privsep-root.c +index f88f56dd..0f099bb7 100644 +--- a/src/privsep-root.c ++++ b/src/privsep-root.c +@@ -435,8 +435,10 @@ ps_root_dispatchcb(void *arg, struct ps_msghdr *psm, struct msghdr *msg) + struct dhcpcd_ctx *ctx = arg; + ssize_t err; + ++#ifdef INET + err = ps_bpf_dispatch(ctx, psm, msg); + if (err == -1 && errno == ENOTSUP) ++#endif + err = ps_inet_dispatch(ctx, psm, msg); + return err; + } +-- +cgit v1.2.3 +