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 CB63F138334 for ; Wed, 25 Sep 2019 14:01:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0CCCFE088C; Wed, 25 Sep 2019 14: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 D6BE2E088C for ; Wed, 25 Sep 2019 14:01:33 +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 14E4B34B554 for ; Wed, 25 Sep 2019 14:01:30 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 661267FB for ; Wed, 25 Sep 2019 14:01:27 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1569419987.07866a257c4ddf91baf828c5a02ac977d67ea855.whissi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/iproute2/, sys-apps/iproute2/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/iproute2/files/iproute2-5.2.0-fix-sys-queue-h-on-musl.patch sys-apps/iproute2/iproute2-5.2.0-r1.ebuild X-VCS-Directories: sys-apps/iproute2/ sys-apps/iproute2/files/ X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 07866a257c4ddf91baf828c5a02ac977d67ea855 X-VCS-Branch: master Date: Wed, 25 Sep 2019 14:01:27 +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: a0b5a2a3-7326-4949-856a-867f27737264 X-Archives-Hash: 2e99c8dc37b453cb31ec4053de68d7b6 commit: 07866a257c4ddf91baf828c5a02ac977d67ea855 Author: Thomas Deutschmann gentoo org> AuthorDate: Wed Sep 25 13:59:34 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Wed Sep 25 13:59:47 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07866a25 sys-apps/iproute2: fix build on musl Closes: https://bugs.gentoo.org/690486 Package-Manager: Portage-2.3.76, Repoman-2.3.17 Signed-off-by: Thomas Deutschmann gentoo.org> .../iproute2-5.2.0-fix-sys-queue-h-on-musl.patch | 83 ++++++++++++++++++++++ sys-apps/iproute2/iproute2-5.2.0-r1.ebuild | 1 + 2 files changed, 84 insertions(+) diff --git a/sys-apps/iproute2/files/iproute2-5.2.0-fix-sys-queue-h-on-musl.patch b/sys-apps/iproute2/files/iproute2-5.2.0-fix-sys-queue-h-on-musl.patch new file mode 100644 index 00000000000..6bc129fa31f --- /dev/null +++ b/sys-apps/iproute2/files/iproute2-5.2.0-fix-sys-queue-h-on-musl.patch @@ -0,0 +1,83 @@ +From 33267017faf1a188d1286f5c423454a060517e39 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Fri, 26 Jul 2019 22:01:05 +0100 +Subject: iproute2: devlink: port from sys/queue.h to list.h + +sys/queue.h does not exist on linux-musl targets and fails build as: + + devlink.c:28:10: fatal error: sys/queue.h: No such file or directory + 28 | #include + | ^~~~~~~~~~~~~ + +The change ports to list.h API and drops dependency of 'sys/queue.h'. +The API maps one-to-one. + +Build-tested on linux-musl and linux-glibc. + +Bug: https://bugs.gentoo.org/690486 +CC: Stephen Hemminger +CC: netdev@vger.kernel.org +Signed-off-by: Sergei Trofimovich +Signed-off-by: Stephen Hemminger +--- + devlink/devlink.c | 15 +++++++-------- + 1 file changed, 7 insertions(+), 8 deletions(-) + +diff --git a/devlink/devlink.c b/devlink/devlink.c +index bb023c0c..0ea401ae 100644 +--- a/devlink/devlink.c ++++ b/devlink/devlink.c +@@ -25,7 +25,6 @@ + #include + #include + #include +-#include + + #include "SNAPSHOT.h" + #include "list.h" +@@ -5981,13 +5980,13 @@ static int fmsg_value_show(struct dl *dl, int type, struct nlattr *nl_data) + + struct nest_qentry { + int attr_type; +- TAILQ_ENTRY(nest_qentry) nest_entries; ++ struct list_head nest_entries; + }; + + struct fmsg_cb_data { + struct dl *dl; + uint8_t value_type; +- TAILQ_HEAD(, nest_qentry) qhead; ++ struct list_head qhead; + }; + + static int cmd_fmsg_nest_queue(struct fmsg_cb_data *fmsg_data, +@@ -6001,13 +6000,13 @@ static int cmd_fmsg_nest_queue(struct fmsg_cb_data *fmsg_data, + return -ENOMEM; + + entry->attr_type = *attr_value; +- TAILQ_INSERT_HEAD(&fmsg_data->qhead, entry, nest_entries); ++ list_add(&fmsg_data->qhead, &entry->nest_entries); + } else { +- if (TAILQ_EMPTY(&fmsg_data->qhead)) ++ if (list_empty(&fmsg_data->qhead)) + return MNL_CB_ERROR; +- entry = TAILQ_FIRST(&fmsg_data->qhead); ++ entry = list_first_entry(&fmsg_data->qhead, struct nest_qentry, nest_entries); + *attr_value = entry->attr_type; +- TAILQ_REMOVE(&fmsg_data->qhead, entry, nest_entries); ++ list_del(&entry->nest_entries); + free(entry); + } + return MNL_CB_OK; +@@ -6116,7 +6115,7 @@ static int cmd_health_object_common(struct dl *dl, uint8_t cmd, uint16_t flags) + return err; + + data.dl = dl; +- TAILQ_INIT(&data.qhead); ++ INIT_LIST_HEAD(&data.qhead); + err = _mnlg_socket_sndrcv(dl->nlg, nlh, cmd_fmsg_object_cb, &data); + return err; + } +-- +cgit 1.2-0.3.lf.el7 + diff --git a/sys-apps/iproute2/iproute2-5.2.0-r1.ebuild b/sys-apps/iproute2/iproute2-5.2.0-r1.ebuild index 5beda6e4bc4..a9648404f62 100644 --- a/sys-apps/iproute2/iproute2-5.2.0-r1.ebuild +++ b/sys-apps/iproute2/iproute2-5.2.0-r1.ebuild @@ -48,6 +48,7 @@ PATCHES=( "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907 "${FILESDIR}"/${PN}-4.20.0-configure-nomagic.patch # bug 643722 "${FILESDIR}"/${PN}-5.1.0-portability.patch + "${FILESDIR}"/${PN}-5.2.0-fix-sys-queue-h-on-musl.patch ) src_prepare() {