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 +