Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B3116CF9C69 for ; Sun, 22 Sep 2024 18:18:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 63A2240018; Sun, 22 Sep 2024 18:18:48 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id vTvvNN7jUDwd; Sun, 22 Sep 2024 18:18:47 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 133ED40247 Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 133ED40247; Sun, 22 Sep 2024 18:18:47 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 9CE8E1BF3E1 for ; Sun, 22 Sep 2024 18:18:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 8C604811B1 for ; Sun, 22 Sep 2024 18:18:45 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id tt4qrwS3BXy1 for ; Sun, 22 Sep 2024 18:18:44 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::62d; helo=mail-ej1-x62d.google.com; envelope-from=dario.binacchi@amarulasolutions.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 38B73811AD DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 38B73811AD Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by smtp1.osuosl.org (Postfix) with ESMTPS id 38B73811AD for ; Sun, 22 Sep 2024 18:18:44 +0000 (UTC) Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a83562f9be9so409697566b.0 for ; Sun, 22 Sep 2024 11:18:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727029122; x=1727633922; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uC0NinD4RAR+J93t1HtcJ+2f1Uv5sU6KbDnUAU/qnrE=; b=Ej9l7fRKJCZvXtJtMCROnSd56mxLMxtqcnr5B1Nd0CPEOrmjlTPS4aYo6aTzpIsByc 9AvsAcRLYRNfg9xiNTzJIs28eKV39UiT35JCQf9P3Tel2ZfqGLhgnwmrnu+AzVgS3HnJ UCXEt+oKJ0oI8o5zxPi4FGOgnKj3equ3n/rdGr51aMPfkj7O3vDiVQJTT4CGZHfTaO7/ W3XEeG+pcdfYxd0hcwU2hD7pNXQ1Q8uQT2S/j95akoT9ju7UUZHqjvcXmpW0o8NLT03b DPbv/qG/t1Zom92OM242hgdwocG4+6M+fgWU5bkGgvd8T/SKl41AYVxkNm29BLGDHG/C G94w== X-Gm-Message-State: AOJu0YyXeZfRoZz9kWuGE9h/P0ZqPDberRxbqQt3R4A3IHfUPfl3ViHD udt6Un926zHJT8TWsiqqfQ8f6f2cuMRI72V0T3UEfbvF6Wzqg7pxwQkT+Mf2HstuA4r5dnRIAfi A9/s= X-Google-Smtp-Source: AGHT+IE0cqbtr9CsHdeOfYCqRESshS7FFe0IXuhpzRRZxyum82n3IKIoP79ug9LlTsXvqvsfcF5YEw== 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 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-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1727029122; x=1727633922; darn=buildroot.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=uC0NinD4RAR+J93t1HtcJ+2f1Uv5sU6KbDnUAU/qnrE=; b=g2B91RlIcU017LiG9yEyUhQIikwvGKSRpadx79Xy6IJcSV4pbcd2/cTQDcjJIlqP7u UjmbnZkG4TAboBHgdlBU6yDLxA7B9ZDDC6BWp32HFJjzOlS1Zva+EHCCJADaZuJTiUei ovWyMwFd4kcVEqOyQ+Wh9dCssTF3b+NeOd76E= X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key, unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=g2B91RlI Subject: [Buildroot] [PATCH v2 1/2] package/iproute2: fix building error using designated initializers X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Petr Vorel , Dario Binacchi , linux-amarula@amarulasolutions.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" 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 + -- 2.43.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot