From patchwork Sun Sep 22 18:18:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3515 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 8BBBB40D67 for ; Sun, 22 Sep 2024 20:18:44 +0200 (CEST) Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-5c24e546f3fsf1952033a12.1 for ; Sun, 22 Sep 2024 11:18:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727029124; cv=pass; d=google.com; s=arc-20240605; b=NhFqjFQAIftNm1dTL8R0KIEWWG0+RQ4gKxgIVOPGvvM0TtHTYAXpkui/9oyPoAzUfS 3Fb91htCKwPCZK/xWIBiDuVWBQWAnMjJ2KAxodefgORkgI9gfLQXB1ChvAkk9TQPpi2u sY/OZFXqavST5fH3vOceDRIwknAl4VXzg1Sou8YdJR14Ovdozhw88w5b/bN9pz330Eyo 2LaVRWJRneuwmNYE+BfdSduN1TKydO6rYnxiZ19Z2T5Z4ZlOKEl0dBEOgfdxzazIavlA lY9Y7amNuThvOad5YqEIzJQWbrIQ8bScmSK529GAfj/DfrIENsP7P0qPefJFUb6J7V2m XljQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=bAgW3tT4SWQmXstF5N4q2rb38LPWYAqRAMc2AYGZPP4=; fh=q/aU3dnVwu8wG/7nz9GW//M1aoJX8WGFNZ+6/Ft7EGE=; b=HW21EI17zo81s5/IcPmdiVSewToeK3cFksZSXLqu4xmUCFmQy1t2Tj3XDmO32IbVoG qc4mrKvld+/tNqzlzXtadozr0+GJoHIELRtdF2Bi4JMO/EkBAI4dVdjryawjqWRdEJpd yXGy7rmx6QEFMNkz6uTheZX1JTqWbOtVcy99iP35OrXtQtgi4mf46Y0BGtahrsb4bBmD +QN7D7+imVWhRQ+V7AKBHtaG2qzZ2esQznvHnPMn5kGwATG02LQQ4IG1dJy8Y1wL4+A9 69kH14++/vjhw+OrGYJPb0CiuXKzDY5AsGVR4Pq/CKOaxeAxjWlFUI8ji8d081fEtxM6 klBQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=cSNT1BWL; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1727029124; x=1727633924; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :from:to:cc:subject:date:message-id:reply-to; bh=bAgW3tT4SWQmXstF5N4q2rb38LPWYAqRAMc2AYGZPP4=; b=pSVPXeSzr4hOOylCf+MKejUaW+zRgJSPDXnF47NrFLJVi3ZlNbNhblv+EGcL7LToye hqEnsg4Jy0ahxHhNB6JP8X91TqxsuHsz95bHTtnZG1P9ISoy2Po4xG0DwNjO2aMvvLt8 vmGT61TmaVWt3hAvSfqq/W8Cdfiu3BaGd3NQM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727029124; x=1727633924; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=bAgW3tT4SWQmXstF5N4q2rb38LPWYAqRAMc2AYGZPP4=; b=OYrjOltZu5ngWZ5Y+vItuOzgzhcrnwf/yvCBDnXK2raIKun94UaUFtGIOQTvS9lxDS 7fcoeFzn79lH11em0xF2QA3njdWwKSLZ2X0yig+cPkj1lvJyoQLVpeTn1I8igs6PiHEM nJrxTEwo5XLaBxDqz4iSDPNMTGGgu6qukg0Ti7dFp+ZGXEOZQWqRUT8XoNLEUj16BrqK uJBa5+YdXx6n2mkGWS3MgwZFHgenpCNmt+fUwQUz+VPdB4hOaI4Yff3s4f7acROAT1So Pn82uJsr/GlmXTsEda/bPCyTEh7fGefzeIei7ljPffm+Vi536FVK9EQ17DNlK6rt4TII 9s2g== X-Forwarded-Encrypted: i=2; AJvYcCV9ZoHMhhZEDzyg9uIJra9G8/L8wzJHXGjjH8Du3aK+QDp9z5iDpR9XdUiriTa3FeRg4rZerdomelYacsxc@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YxDRYsoRw2ZJtYbNAJJQTXGn1UiRuxg/4h82h6fT+k71Cs0RVH+ Yu2X40yS08QtOv/dIo9SgAzqfDiYxMbqaNNMIjM6gq8ThBcgeSg+Niqy221ysus7KA== X-Google-Smtp-Source: AGHT+IFxtYlVBYH/OhZKqLYjU1CCv+FBhUDQrl4rtAZXs5W0q9M3RHxqdgFiREUECi9Bmqgzs9yLlQ== X-Received: by 2002:a05:6402:2b94:b0:5a1:c43:82ca with SMTP id 4fb4d7f45d1cf-5c464a5d40emr8491287a12.26.1727029123979; Sun, 22 Sep 2024 11:18:43 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:3588:b0:5c4:2d99:a0c with SMTP id 4fb4d7f45d1cf-5c4595fbf77ls1240457a12.0.-pod-prod-02-eu; Sun, 22 Sep 2024 11:18:42 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWIP1xqG811OeDv//TTi9tlE/7zxtkeykYrbNPaJfdfehoj6kowrHNbhio4R5934FXFUtAjKps8BAOeiPhS@amarulasolutions.com X-Received: by 2002:a17:907:1c1b:b0:a80:f6a9:c311 with SMTP id a640c23a62f3a-a90d4dfbf8dmr979742266b.0.1727029122431; Sun, 22 Sep 2024 11:18:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727029122; cv=none; d=google.com; s=arc-20160816; b=M35YXnuFiW+NSQXupT4hTWZU/eL3B5PdwpNSz4qVGprFm8DGG6m7qUbU7z1yKYR7fK xPRd4gbPiZwXDX/kX2i0U/1BWFvoxV9YpINv3zsQRw0DBrua4PtTQlsoLz8zfh/ecZ+0 SDbAmA+wv1PdSVeUSxR4czilMqFUFbEwNNF2rzaEhQK9xid2VUtIZ3KmZ23/Va7cqZtP 9qxkiA4z38sm2E8BGndeF414fAz+qqGV5KvFeWnOmacSPAVsbyeUWtZmYwxsjm3zd+yA b9gnSnR0qpJZIVVj6nhLqCDdYESF5OAdKQp7u4mdfrcpsRoG01+5gRm/BtZsa4cB8EDh Ef6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=uC0NinD4RAR+J93t1HtcJ+2f1Uv5sU6KbDnUAU/qnrE=; fh=stmR5ssWgi7cCHDN5o79owYZomyAqvc3pgbE/L41yVA=; b=nRTduYJL/HXekEzG1dTI1jBFEP/GUZwgWAQWaqsdAWC0VQXUHyfdUH5qDEJFy/QKUo 6EaartMbePGtSHegkYK1SMdRLlVG9BIVeDrsMD7pPbU9l6TI6QVf4BFd8qJTbnQ7Fs+z suQ/wwlDWE7Vd76wKYXd+KyA6EKhYcPPpPx3NTe0AkR2z085obrlbEa/pNLRJ+GssecA qI+dJPLZDcKYggULwunAESugTQ2EWjW18u6jh2XG7pPalC9cKGzH5sjj2/+XwuXXhl9q pY3Dvcy/dzpQXUbC8+Ya0ZEkN0ruUoxUQXTg2Sfdd+7mxUpktjGCw0oHSJSEh3Xp5Oj+ bIDw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=cSNT1BWL; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a640c23a62f3a-a90612ca9ffsor604989766b.15.2024.09.22.11.18.42 for (Google Transport Security); Sun, 22 Sep 2024 11:18:42 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Forwarded-Encrypted: i=1; AJvYcCUSdtE+79IJHjZrvrF3kLdvf23SolFKJuWQVdhHkccVHpx4+u8511fhag1OWLc3PJYkfubbvoMVISF3k2Zd@amarulasolutions.com X-Received: by 2002:a17:907:868d:b0:a8a:cc5a:7f3c with SMTP id a640c23a62f3a-a90d5126c2emr947850866b.58.1727029121938; Sun, 22 Sep 2024 11:18:41 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-20-102-52.retail.telecomitalia.it. [79.20.102.52]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a90610f3883sm1111852766b.50.2024.09.22.11.18.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Sep 2024 11:18:41 -0700 (PDT) From: Dario Binacchi To: buildroot@buildroot.org Cc: Petr Vorel , linux-amarula@amarulasolutions.com, Dario Binacchi Subject: [PATCH v2 1/2] package/iproute2: fix building error using designated initializers Date: Sun, 22 Sep 2024 20:18:30 +0200 Message-ID: <20240922181831.2901344-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=cSNT1BWL; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch fixes the following error: arpd.c:442:17: error: initialization of 'int' from 'void *' makes integer from pointer without a cast [-Wint-conversion] 442 | NULL, 0, The analysis of socket.h [1] containing the msghdr structure shows that it has been modified with the addition of padding fields, which cause the compilation error: struct msghdr { void *msg_name; socklen_t msg_namelen; struct iovec *msg_iov; #if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN int __pad1; #endif int msg_iovlen; #if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN int __pad1; #endif void *msg_control; #if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN int __pad2; #endif socklen_t msg_controllen; #if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN int __pad2; #endif int msg_flags; }; The use of designated initializers allows the issue to be fixed. [1] iproute2/host/mips64-buildroot-linux-musl/sysroot/usr/include/sys/socket.h Fixes: - http://autobuild.buildroot.org/results/e4cdfa38ae9578992f1c0ff5c4edae3cc0836e3c Signed-off-by: Dario Binacchi --- No changes since v1 ...ted-initializers-for-msghdr-structur.patch | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 package/iproute2/0003-arpd-use-designated-initializers-for-msghdr-structur.patch diff --git a/package/iproute2/0003-arpd-use-designated-initializers-for-msghdr-structur.patch b/package/iproute2/0003-arpd-use-designated-initializers-for-msghdr-structur.patch new file mode 100644 index 000000000000..f8b9f7d08877 --- /dev/null +++ b/package/iproute2/0003-arpd-use-designated-initializers-for-msghdr-structur.patch @@ -0,0 +1,70 @@ +From 13cea6bb5e4f08f534fa4b04b5fc4ea0c8a2467b Mon Sep 17 00:00:00 2001 +From: Dario Binacchi +Date: Wed, 18 Sep 2024 14:22:34 +0200 +Subject: [PATCH] arpd: use designated initializers for msghdr structure + +This patch fixes the following error: + +arpd.c:442:17: error: initialization of 'int' from 'void *' makes integer from pointer without a cast [-Wint-conversion] + 442 | NULL, 0, + +raised by Buildroot autobuilder [1]. + +In the case in question, the analysis of socket.h [2] containing the +msghdr structure shows that it has been modified with the addition of +padding fields, which cause the compilation error. The use of designated +initializers allows the issue to be fixed. + +struct msghdr { + void *msg_name; + socklen_t msg_namelen; + struct iovec *msg_iov; +#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN + int __pad1; +#endif + int msg_iovlen; +#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN + int __pad1; +#endif + void *msg_control; +#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN + int __pad2; +#endif + socklen_t msg_controllen; +#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN + int __pad2; +#endif + int msg_flags; +}; + +[1] http://autobuild.buildroot.org/results/e4cdfa38ae9578992f1c0ff5c4edae3cc0836e3c/ +[2] iproute2/host/mips64-buildroot-linux-musl/sysroot/usr/include/sys/socket.h + +Signed-off-by: Dario Binacchi +Upstream: https://lore.kernel.org/netdev/20240919132454.7394-1-dario.binacchi@amarulasolutions.com/T/#mac98a56b7ce0235a6e2b97afe8aa8565de4c926d +--- + misc/arpd.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/misc/arpd.c b/misc/arpd.c +index e77ef53928a2..b4935c23eebb 100644 +--- a/misc/arpd.c ++++ b/misc/arpd.c +@@ -437,10 +437,10 @@ static void get_kern_msg(void) + struct iovec iov; + char buf[8192]; + struct msghdr msg = { +- (void *)&nladdr, sizeof(nladdr), +- &iov, 1, +- NULL, 0, +- 0 ++ .msg_name = &nladdr, .msg_namelen = sizeof(nladdr), ++ .msg_iov = &iov, .msg_iovlen = 1, ++ .msg_control = (void *)NULL, .msg_controllen = 0, ++ .msg_flags = 0 + }; + + iov.iov_base = buf; +-- +2.43.0 + From patchwork Sun Sep 22 18:18:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3516 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 63C5740D67 for ; Sun, 22 Sep 2024 20:18:46 +0200 (CEST) Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-5c2483adeeasf5070666a12.1 for ; Sun, 22 Sep 2024 11:18:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727029126; cv=pass; d=google.com; s=arc-20240605; b=RtATZ5P4lQ8gHhfwKEZZRctqXpoH4cyxEYwsChVrsdRmeEhlhM7s7QQIovLMfcfYKu q07H5VNOhIfEVUX/vmaXMFLIR4YmCTGgjoaZ4xX7ZiDzp6T6lzjvqhAKKvZIOX1cUC2P 386zLscvlP6rwytGtrM97JBCvYrmnSshH9TB4VUcVQssktj+WCYWK4Zvf+mOcGoQdEiU f86zV/4YhFCtstST0tIGMdpNgcHqyNN5TU1QrcenmI4zJl9is3EMCbvZvW00t5ESBJNP MqxCqDeHfUZBEwBtqasFTQMLYeONF77eVUtmetTm09Nb8933S4tMNcyZl1GynzQqoc7c CIMw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=LUhcoTtmTDDbd0jKOjvwR/JUWtmYdPWKAsCq/nN9D04=; fh=jh9+/0IHVZ8nIcEMjatt9h8r6P+mhyeLTNT7r9Zt7Ng=; b=jNC3SlhLRssz7aDSQZaCbgExNc94krMESAtsGvsnyAqjmCX1L0paKWnPvEWmfakhJu LIRbtpDSywXji0UjamP25luHCM4lkENxOiaJccqNMWobFDREHcdycXop/EDQGvUt75UV 6tu8FY1Y/Re8n2rM+wyLN8URj3/BcmwTrs0TcirrS1TVkAE5jSkmrtLu6qwW+ixW4vQN 7+sYtPfHyr0fBmy/0JENORhsyGj2RKwWNisFrtEwvgvZgbHRsMjwx7tpIBW2Na+d5OJO oNgfEIJ1Lgmprmqp+8O/xJ54VoqhjWqDtl6J8RZes3Cu0C+pggFc7QNaQdrpUKCaSC86 TybQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=iQHaOdP+; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1727029126; x=1727633926; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=LUhcoTtmTDDbd0jKOjvwR/JUWtmYdPWKAsCq/nN9D04=; b=Mx2tRUr4x4ieLiNY7CUw9u8o3p1/bPnfkYrPMENFUT0dyfp14B/sN+LuP+WqAUmZo6 7GKhQBn/RgyYwQFL4e54hR3kwp7bXeI9d68nDCf00846Et2nTYWXcmg1B8XKatAEaxmk lu1MMP9pMvrn55U9RcKkfQFBAJJmsOqELF8ls= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727029126; x=1727633926; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LUhcoTtmTDDbd0jKOjvwR/JUWtmYdPWKAsCq/nN9D04=; b=AJVLZb/HFhG399V5m4N6UNG/nfeHmpYnhiURiaQIFfa28I63xF4Cd5MbfpRA+TKnCK e8ZZmHii1fQk/WV/hM1on+tvt1GYGc66G5mdNjLIWHpReqhL5Lfdcm4BnI9cn2uBkcAr r21mDzzHcjrhSZ1mnsaTUhO3Ge3miuzWIZFIql3HMnjnakF7Dwp0LhNe38xrJAfO4H4o FtdQvDyDrmUagzaPV/zsR4NSDYIVe1QdkAG5Z8knX9ZbzGlsr54IRWjjmd3/r6ua3BJu SaXZISJ8agqPS1uEG6964c3ojRTCXEOPVBK5fBn9JgBuA/7fknE9mBcG0dLAsKyDS1DM E1JQ== X-Forwarded-Encrypted: i=2; AJvYcCVxOjCrJGyi5Nct69sGy19w/2U21ukId78QGrnwpmAY4yXW0Slbv++nR33Hwdroz9hh1A6Rn/3VhHlSn/kI@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YwTtrlRpdanT7ZeuUl5a9hyZyvc4v+qnaDHbyqE2l73InUcn1U6 xWVp9kY48HOOHZ2/LxmRPmmb7RcC6Bg3/uwZe0Vp20pr5aRrYh4eqeBqy84Qh8IoLg== X-Google-Smtp-Source: AGHT+IGSS3FzCC1IbPIUmeksazL8LxAjGFXJ3/xdXyYQ4eraFCSTdUuAMHqmYa1UR/Bl2huLDJrHNg== X-Received: by 2002:a05:6402:2108:b0:5c5:c059:6432 with SMTP id 4fb4d7f45d1cf-5c5c0596620mr1966229a12.1.1727029125269; Sun, 22 Sep 2024 11:18:45 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a50:9346:0:b0:5c4:651d:a541 with SMTP id 4fb4d7f45d1cf-5c4651da703ls313466a12.0.-pod-prod-00-eu; Sun, 22 Sep 2024 11:18:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUvZslg1xMS9bO8qGNaWXZOnIOZ8YB+D2VimSyLVm9UM/XZX6v0DAzlHoyjSxr0dFNLXdf2daN0cQJFf32R@amarulasolutions.com X-Received: by 2002:a17:907:3f9b:b0:a8a:9243:486 with SMTP id a640c23a62f3a-a90d362c7c4mr1130943766b.21.1727029123451; Sun, 22 Sep 2024 11:18:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727029123; cv=none; d=google.com; s=arc-20240605; b=MkHGjA1+B8kiwInkPX/RUIQqFBL8qNctYuqfgoHaJT1H/CojiYRvpN07B8tr+eFNbY udsFPyTszzviDUgudvrAzPWAM0hqIdqYIOal8m0Fe3dhjrwC7dIe8hjCTcV7vHHLPAiB jMIE9Ofd3Qpqn9eI6OCdDjtyAwiEv1AAr4n+Xn2vE+s7T84nVwxMV0/cWzucZUKLr7Fr ajokw5ufugTbUNRkYsM16/FeuEP5LJ+mhJoubJxj1rr2Jx0oe8U/1kig/7yDfi03LjvK T2ymZiO5O02KPcyU2D5bOXned5SHcE/QuOdO7kHYQsteutqPVQnRx67jm+sDtEUa6unV 3MXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=YkW9YTAjgxGhm9kaSVFMmDdvs/iVT/bOpOv00PNc7js=; fh=afT2JcflgaIH1p29h8MT2TOkxVugDtOorjfQT0Q4++U=; b=dEHRnYoGmUFXdbpKrxoFxbHi9LFg2h5195p/vi9lg9LJotFOzhmBl8nCml1v4K5l4e cSSktxFL/Gv4sfckafEDH1d4HdXjjOKHx8Q2m0VAip0ewbxmIVEBJGBTD/An9tJ7CmGX mxkQFYCiiIszRn4dv9WOrUAxqr0B6l9gGtBRU1pZeJkCN/qUe8NjTci/6uPqIZKSw8rQ hSGzbhrdCVJ91ICvODpBMROW7NbFMfAUX6KkJaQLBb/Sj/CAHVufDSO1QIeWPOv4mTnU h29v3AZX8OshBTOOI25FikXcV+VI2SdQEcP3nRR433Atl/n0cnqHROj/tzuzXL9AC4h3 LTpg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=iQHaOdP+; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a640c23a62f3a-a90c16413b2sor340326066b.2.2024.09.22.11.18.43 for (Google Transport Security); Sun, 22 Sep 2024 11:18:43 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Forwarded-Encrypted: i=1; AJvYcCXSv9EvwHal03g3N8fRdra8ToehbsoO2sCWSqBPyJ1FxMNEMnWJgJzUzcJ7y5iK1eZfqZr6IMIjIBPFUnkf@amarulasolutions.com X-Received: by 2002:a17:906:7951:b0:a7a:acae:340b with SMTP id a640c23a62f3a-a90d364468bmr896974066b.31.1727029122774; Sun, 22 Sep 2024 11:18:42 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-20-102-52.retail.telecomitalia.it. [79.20.102.52]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a90610f3883sm1111852766b.50.2024.09.22.11.18.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Sep 2024 11:18:42 -0700 (PDT) From: Dario Binacchi To: buildroot@buildroot.org Cc: Petr Vorel , linux-amarula@amarulasolutions.com, Dario Binacchi Subject: [PATCH v2 2/2] package/iproute2: bump to version 6.11.0 Date: Sun, 22 Sep 2024 20:18:31 +0200 Message-ID: <20240922181831.2901344-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240922181831.2901344-1-dario.binacchi@amarulasolutions.com> References: <20240922181831.2901344-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=iQHaOdP+; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The building test using musl as the C library for the cross-compilation toolchain raised errors that required the application of two additional patches. Furthermore, it was necessary, by properly setting CFLAGS, to instruct iproute2 not to define structures already provided by musl to avoid redefinition errors (i. e. in6_addr and sockaddr_in6). Signed-off-by: Dario Binacchi --- Added in v2 ...04-bridge-mst-fix-a-musl-build-issue.patch | 73 +++++++++++++++++++ ...e-mst-fix-a-further-musl-build-issue.patch | 56 ++++++++++++++ package/iproute2/iproute2.hash | 2 +- package/iproute2/iproute2.mk | 6 +- 4 files changed, 135 insertions(+), 2 deletions(-) create mode 100644 package/iproute2/0004-bridge-mst-fix-a-musl-build-issue.patch create mode 100644 package/iproute2/0005-bridge-mst-fix-a-further-musl-build-issue.patch diff --git a/package/iproute2/0004-bridge-mst-fix-a-musl-build-issue.patch b/package/iproute2/0004-bridge-mst-fix-a-musl-build-issue.patch new file mode 100644 index 000000000000..9dddfb6e7f26 --- /dev/null +++ b/package/iproute2/0004-bridge-mst-fix-a-musl-build-issue.patch @@ -0,0 +1,73 @@ +From 0359ee6dc57ee8aa21a3f0f7404422c0f9372d3a Mon Sep 17 00:00:00 2001 +From: Dario Binacchi +Date: Sun, 22 Sep 2024 14:00:42 +0200 +Subject: [PATCH] bridge: mst: fix a musl build issue + +This patch fixes a compilation error raised by the bump to version 6.11.0 +in Buildroot using musl as the C library for the cross-compilation +toolchain. + +After setting the CFLGAS + +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +IPROUTE2_CFLAGS += -D__UAPI_DEF_IN6_ADDR=0 -D__UAPI_DEF_SOCKADDR_IN6=0 \ + -D__UAPI_DEF_IPV6_MREQ=0 +endif + +to fix the following errors: + +In file included from ../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/arpa/inet.h:9, + from ../include/libnetlink.h:14, + from mst.c:10: +../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:23:8: error: redefinition of 'struct in6_addr' + 23 | struct in6_addr { + | ^~~~~~~~ +In file included from ../include/uapi/linux/if_bridge.h:19, + from mst.c:7: +../include/uapi/linux/in6.h:33:8: note: originally defined here + 33 | struct in6_addr { + | ^~~~~~~~ +../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:34:8: error: redefinition of 'struct sockaddr_in6' + 34 | struct sockaddr_in6 { + | ^~~~~~~~~~~~ +../include/uapi/linux/in6.h:50:8: note: originally defined here + 50 | struct sockaddr_in6 { + | ^~~~~~~~~~~~ +../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:42:8: error: redefinition of 'struct ipv6_mreq' + 42 | struct ipv6_mreq { + | ^~~~~~~~~ +../include/uapi/linux/in6.h:60:8: note: originally defined here + 60 | struct ipv6_mreq { + +I got this further errors + +../include/uapi/linux/in6.h:72:25: error: field 'flr_dst' has incomplete type + 72 | struct in6_addr flr_dst; + | ^~~~~~~ +../include/uapi/linux/if_bridge.h:711:41: error: field 'ip6' has incomplete type + 711 | struct in6_addr ip6; + | ^~~ + +fixed by including the netinet/in.h header. + +Signed-off-by: Dario Binacchi +Upstream: https://patchwork.kernel.org/project/netdevbpf/patch/20240922145011.2104040-1-dario.binacchi@amarulasolutions.com/ +--- + bridge/mst.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/bridge/mst.c b/bridge/mst.c +index 873ca5369fd6..c8f7e6606c3c 100644 +--- a/bridge/mst.c ++++ b/bridge/mst.c +@@ -4,6 +4,7 @@ + */ + + #include ++#include + #include + #include + +-- +2.43.0 + diff --git a/package/iproute2/0005-bridge-mst-fix-a-further-musl-build-issue.patch b/package/iproute2/0005-bridge-mst-fix-a-further-musl-build-issue.patch new file mode 100644 index 000000000000..f4e7c317bf9c --- /dev/null +++ b/package/iproute2/0005-bridge-mst-fix-a-further-musl-build-issue.patch @@ -0,0 +1,56 @@ +From 62c4dfff5ff596984ece7960fba49b05d69f37a7 Mon Sep 17 00:00:00 2001 +From: Dario Binacchi +Date: Sun, 22 Sep 2024 14:11:18 +0200 +Subject: [PATCH] bridge: mst: fix a further musl build issue + +This patch fixes the following build errors: + +In file included from mst.c:11: +../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration + 80 | _PRINT_FUNC(tv, const struct timeval *) + | ^~~~~~~ +../include/json_print.h:50:37: note: in definition of macro '_PRINT_FUNC' + 50 | type value); \ + | ^~~~ +../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration + 80 | _PRINT_FUNC(tv, const struct timeval *) + | ^~~~~~~ +../include/json_print.h:55:45: note: in definition of macro '_PRINT_FUNC' + 55 | type value) \ + | ^~~~ +../include/json_print.h: In function 'print_tv': +../include/json_print.h:58:48: error: passing argument 5 of 'print_color_tv' from incompatible pointer type [-Wincompatible-pointer-types] + 58 | value); \ + | ^~~~~ + | | + | const struct timeval * +../include/json_print.h:80:1: note: in expansion of macro '_PRINT_FUNC' + 80 | _PRINT_FUNC(tv, const struct timeval *) + | ^~~~~~~~~~~ +../include/json_print.h:50:42: note: expected 'const struct timeval *' but argument is of type 'const struct timeval *' + 50 | type value); \ + | ^ +../include/json_print.h:80:1: note: in expansion of macro '_PRINT_FUNC' + 80 | _PRINT_FUNC(tv, const struct timeval *) + +Signed-off-by: Dario Binacchi +Upstream: https://patchwork.kernel.org/project/netdevbpf/patch/20240922145011.2104040-2-dario.binacchi@amarulasolutions.com/ +--- + bridge/mst.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/bridge/mst.c b/bridge/mst.c +index c8f7e6606c3c..fccb7fd68140 100644 +--- a/bridge/mst.c ++++ b/bridge/mst.c +@@ -4,6 +4,7 @@ + */ + + #include ++#include + #include + #include + #include +-- +2.43.0 + diff --git a/package/iproute2/iproute2.hash b/package/iproute2/iproute2.hash index 0760183b9e66..028a32439644 100644 --- a/package/iproute2/iproute2.hash +++ b/package/iproute2/iproute2.hash @@ -1,3 +1,3 @@ # From https://kernel.org/pub/linux/utils/net/iproute2/sha256sums.asc -sha256 91a62f82737b44905a00fa803369c447d549e914e9a2a4018fdd75b1d54e8dce iproute2-6.10.0.tar.xz +sha256 1f795398a04aeaacd06a8f6ace2cfd913c33fa5953ca99daae83bb5c534611c3 iproute2-6.11.0.tar.xz sha256 e6d6a009505e345fe949e1310334fcb0747f28dae2856759de102ab66b722cb4 COPYING diff --git a/package/iproute2/iproute2.mk b/package/iproute2/iproute2.mk index 08b890b33117..ae95de045b02 100644 --- a/package/iproute2/iproute2.mk +++ b/package/iproute2/iproute2.mk @@ -4,7 +4,7 @@ # ################################################################################ -IPROUTE2_VERSION = 6.10.0 +IPROUTE2_VERSION = 6.11.0 IPROUTE2_SOURCE = iproute2-$(IPROUTE2_VERSION).tar.xz IPROUTE2_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/net/iproute2 IPROUTE2_DEPENDENCIES = host-bison host-flex host-pkgconf \ @@ -53,6 +53,10 @@ endef # workaround for static_assert on uclibc-ng < 1.0.42 IPROUTE2_CFLAGS = $(TARGET_CFLAGS) -Dstatic_assert=_Static_assert +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +IPROUTE2_CFLAGS += -D__UAPI_DEF_IN6_ADDR=0 -D__UAPI_DEF_SOCKADDR_IN6=0 \ + -D__UAPI_DEF_IPV6_MREQ=0 +endif define IPROUTE2_BUILD_CMDS $(TARGET_MAKE_ENV) LDFLAGS="$(TARGET_LDFLAGS)" \