From patchwork Thu Sep 19 14:01:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3498 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 251153F13F for ; Thu, 19 Sep 2024 16:01:22 +0200 (CEST) Received: by mail-lf1-f72.google.com with SMTP id 2adb3069b0e04-5356a05fc7csf985926e87.0 for ; Thu, 19 Sep 2024 07:01:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1726754481; cv=pass; d=google.com; s=arc-20240605; b=gNKoCBzwTY6HwMLpJZOY4KWxVHrcWbxgynWkwhVmhCrZx3Xzt6rfjlNfB3aPU9fX5E DV97TDfXkI3mTVfERgYMRVengYwge4G+iryVyLnDAZGXeotM2oTtq59SwQ2p9UVCf6kE /OvmQIfjCyHygutw0EJYjhMIKNFHOaFHGIQXKcMDqNyeUv2jAOu9BH+BfNYk6d8LM0pF ea3PT0oWmOz92pLf0pG1uZSmyPvG7prxZX8RkTaBXig8kKdDxGFcK0bKLWuSWUBsw/LA kNThXN0goo30OUNu4RgHgM/2Iqvy0FXRvu3O7jDidxN15Ak+R2hR49V+Vho7gnSeFksR 6pvg== 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=vbU47hmMzOAQ/GUZe2opyx6pJxEkX4Fz8H10wbb7SMg=; fh=xAy8vlhW7VrYSUWjbo9pQtNm/jshyOde/0lZNC1hovE=; b=SEGhD7drAQsc4tNxPpdxWKE1qLGJn5Gw3XSVOlsQG/6XT1wxH/Mb0u+0l8URGHcGgP LXdCB9tWqZ8xwDmwADAstnVrp0J5osOcntv54CdDnsQrz9KbyFHf+b16CArF3qXPqEfF +lyCLcz8p/6svmYAwA+Y4RMxPWL9iFeOE4FkgHEplIgNsuAi4Xbr/bJ/aFIiJx2wfeXH isje8MIHpsZo3H3EUJZ6xRzDrCnyRheQE7ihp1TWLLri4dUzQ/RTKoZuXTyos5evl7xy vKBH48FUl0+Y2thL3nGNuaAaIlgK6fmC861XAnguQ3JBfKZd5qvCCEP6VOpoW6h7yKrR HNIA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=g9+tlgIu; 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=1726754481; x=1727359281; 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=vbU47hmMzOAQ/GUZe2opyx6pJxEkX4Fz8H10wbb7SMg=; b=n/rpLCKz3q5HgBvwSR9s3J4v6RHxncMUzmfHpLKDkJMI1Gv++Iutu4uuUzIm069us1 BFJlzOurKmo9a60dCgAvPk3MSivU9JgKDU16Fnd8rYaw9lstQoRdFBpDeeU0mx2DwNQM YU5hc2Tw6Gt0v9YMmGzq68iqMqW+mAKmttGxQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726754481; x=1727359281; 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=vbU47hmMzOAQ/GUZe2opyx6pJxEkX4Fz8H10wbb7SMg=; b=ciTB24uiGh0YgtJv6hgC/hgJXJK6D/+aNEQ0eL4d0knnICeBqZiNtIUqYIfMijozBd Aiuuilj/qfBM6DfzfNZ2toLMmiPaF3RFQgf+UgpzS28pxOtSmN9/72f1fngysme8kxgG miaVZLcR9ldfYjPWtLazt27PkBkgQhahPZLvfYmX7xEgDeQdMd+ZOules5ChElf/fNX0 7nR5FbnzUm/gYjROocDUscYpYoLyQHi0GoizSrKUWmhr9CKkDskSldYrblIXcmC+Vja0 J2FkAOgbwvznBM2sTCw1wSEfEC9eiZ4VusZOMlhRhL/c+tR1cRdeUVvylP6PzEDT/uUx 08Qg== X-Forwarded-Encrypted: i=2; AJvYcCVc8xIxigzs6B7J5RPC/ei0vKVFWdgCpnr66AQ6G7Co0XVavvC3q6GsP6cDr/7nmuCycuEH38Ux5+JifoGy@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YyfKSA5MTXVBZCYix2DNPQ6b0X3Jm3oWbu2n//qL3LvVrxkc2e3 SwGUAUHWDM+4snj1DNQ7YY4eFBDL4BP0cD5wR9riqwSgz/yfzVU/VlYHYbbYhYWLOg== X-Google-Smtp-Source: AGHT+IHD2w5ZvbbXl5Ybr3yCDtE94yw2EfJMgY2jA737YA7oqpIL2AbA1Q4v4I3Tmsw5oWm5yN/oFg== X-Received: by 2002:a05:6512:ad2:b0:536:542e:ce1f with SMTP id 2adb3069b0e04-5367fec8ca6mr16721187e87.18.1726754480743; Thu, 19 Sep 2024 07:01:20 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6512:1105:b0:52f:d1b7:329a with SMTP id 2adb3069b0e04-536a5b750e6ls24326e87.1.-pod-prod-05-eu; Thu, 19 Sep 2024 07:01:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU5gImgYa0ekCvqlXIZyOqWpT585HxGStPb/IkJ+f7FHzWc8pcqqZgpYtwOnKadpSYuJm3vhba4bI4QprXE@amarulasolutions.com X-Received: by 2002:a05:6512:2521:b0:536:a695:9414 with SMTP id 2adb3069b0e04-536a695965cmr2815754e87.6.1726754477331; Thu, 19 Sep 2024 07:01:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726754477; cv=none; d=google.com; s=arc-20160816; b=cFd3It00n7eOZVk+tmZ1wWkQEHYFngLef/cC+lwXB+0ftG3IHZ1nqvQnzUaHyBLsX7 3ebe5A17Xos2aspzN/axBHxfPHeICAQReXAukX4XGSWuxuBlBvF0qi/HZBTGYYG1Zctl FMk8ciWqzRQbprXi0/alD2tMJ7y1p1mAxWNyrzC7QWFQ3V9VF/P5/lWPZu6oTptasOYk Vk2hbzgt4471aej6M/kr9oUEV+OPUUOa8GBp1aLS0VKrwbvHLlNx2FOt5JgGFuMW9FgJ GeaIXFDusyBEm+dQjzIbaz0v0Pl+F3d1sd2tG3rPo9Z9pLKT6gFSulpxAcEGcyARqekh 5efQ== 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=oo5Ef0aBpR/zHKSChssAZ6z4DLyGctMXMBQyvvzxsqU=; fh=vBfreDcua1/x/Qtwh+3cBVhXCdOdQxtAWOL0gBKNJNM=; b=OCdxbgE7bwjTrI89ytJgbu+QL8vU5KhH6yxy8Hr4DPb9MsJuX/W40fzpkDiGhvGuWH PSFITzvXjMOoaquwP39prhMk/nFpkCnKuz0qtHNu/zGXpBaKOsXTtKoHV8QGXyR3p7HU ZjACSkvVjvU5tf/uUWZ79o9VFYox151HQLlZ5IxZw0dIgS1s54H2+wjMrJadExpcF0+R D9IdOYx7/hmKqLhtqJUjZAh7yynixtTwdbPnH0yROeuRxxEaWvT5BCZOHQOTCGlENW3Q OdJpJpteMScWf37bkGMijnyADPUPEMGRgO4wqDkgoMZF5qYPBD5KkChywRh9k7BPVR3E BO9w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=g9+tlgIu; 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 2adb3069b0e04-536870a1614sor3662955e87.30.2024.09.19.07.01.17 for (Google Transport Security); Thu, 19 Sep 2024 07:01:17 -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; AJvYcCUKaQ//aiyvphDM0yyM6Qvinr1ompBODXWdLq1tUUih8eWgXdRNc7G44zwNq4tlrqVd54WJ1yVXRUHTllEN@amarulasolutions.com X-Received: by 2002:a05:6512:3189:b0:533:4785:82ab with SMTP id 2adb3069b0e04-5367feb9598mr17244380e87.1.1726754476265; Thu, 19 Sep 2024 07:01:16 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it ([79.20.102.52]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a90610f43c7sm724097266b.62.2024.09.19.07.01.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Sep 2024 07:01:15 -0700 (PDT) From: Dario Binacchi To: buildroot@buildroot.org Cc: Petr Vorel , linux-amarula@amarulasolutions.com, Dario Binacchi Subject: [PATCH 1/1] package/iproute2: fix building error using designated initializers Date: Thu, 19 Sep 2024 16:01:13 +0200 Message-ID: <20240919140113.17482-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=g9+tlgIu; 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 --- ...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 +