From patchwork Sun Aug 15 10:51:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stijn Tintel X-Patchwork-Id: 1516913 X-Patchwork-Delegate: stijn@linux-ipv6.be Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=LgZfXcry; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linux-ipv6.be header.i=@linux-ipv6.be header.a=rsa-sha256 header.s=502B7754-045F-11E5-BBC5-64595FD46BE8 header.b=N91DxWc4; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GnZ1l5zW0z9sSs for ; Sun, 15 Aug 2021 20:54:51 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=21V0GZ3yYz7p7EuXL3QYicQaIykf2LzZ05sYkdHXkBA=; b=LgZfXcryXPtRJX CnNAwjDntANOdvSaCdLJsieKz8QJgbnkSf4Cg05JkMWASMb1OoZHkShloTtQaeLG9w2kE1OA+s+0f af1glRbUR9+UpGBIO0I8FPh3PzZbQRw9D5nZ+Aw4W+BNoNoS69JMwX7aD8mD6M3tcZUzxxBgtALO5 Shp7THPDRo04I7h0cFJKjJY2amWmpTVKZrL53x2ehGR7YsivqdFwDjYCEpm3c6N0V9DxPA+NpH1pg JXbv7SuIG7n0TpKJZVY/5AEnmofHllwW1w2nxTfzPiwmoqcVuohADeulpo6UpYBFwhs+nF+tAmmbJ 7xjccHcSxjzBOBAKeXSg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mFDkv-00F8uj-4a; Sun, 15 Aug 2021 10:52:41 +0000 Received: from mail.tintel.eu ([51.83.127.189]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mFDju-00F8lK-Pm for openwrt-devel@lists.openwrt.org; Sun, 15 Aug 2021 10:51:40 +0000 Received: from localhost (localhost [IPv6:::1]) by mail.tintel.eu (Postfix) with ESMTP id 0522A4C1CBA6; Sun, 15 Aug 2021 12:51:22 +0200 (CEST) Received: from mail.tintel.eu ([IPv6:::1]) by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id MvFvLxzcGu8i; Sun, 15 Aug 2021 12:51:21 +0200 (CEST) Received: from localhost (localhost [IPv6:::1]) by mail.tintel.eu (Postfix) with ESMTP id A4BD449A2585; Sun, 15 Aug 2021 12:51:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.tintel.eu A4BD449A2585 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-ipv6.be; s=502B7754-045F-11E5-BBC5-64595FD46BE8; t=1629024681; bh=fovgfULz8613SgqV8Lgtw+oc3Zb/gbJ7guczVPpoc7Y=; h=From:To:Date:Message-Id:MIME-Version; b=N91DxWc46LS3iDOs1BmdDfsZPTTv5NHtb3uOQJ3rXX39auSXCG93sbjRjTYseVBzK 8Gf5rIuUp1bzViZYKh6ZQMB6PR7fOwpnlkqK4dDAz5NOJ6cBuM3c2K2asMnpbUFwBJ gDcsTj7tks6TtkLbr37BGgdoBx5zH0gSfRsQXX0A= X-Virus-Scanned: amavisd-new at mail.tintel.eu Received: from mail.tintel.eu ([IPv6:::1]) by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id D5Milpn6JJlo; Sun, 15 Aug 2021 12:51:21 +0200 (CEST) Received: from taz.sof.bg.adlevio.net (unknown [IPv6:2001:67c:21bc:20::10]) by mail.tintel.eu (Postfix) with SMTP id 443204451D37; Sun, 15 Aug 2021 12:51:21 +0200 (CEST) Received: (nullmailer pid 3035622 invoked by uid 1000); Sun, 15 Aug 2021 10:51:19 -0000 From: Stijn Tintel To: openwrt-devel@lists.openwrt.org Cc: hauke@hauke-m.de, rsalvaterra@gmail.com, john@phrozen.org, rosenp@gmail.com Subject: [PATCH 2/6] umbim: fix compilation with GCC 10 Date: Sun, 15 Aug 2021 13:51:15 +0300 Message-Id: <20210815105119.3035569-3-stijn@linux-ipv6.be> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210815105119.3035569-1-stijn@linux-ipv6.be> References: <20210815105119.3035569-1-stijn@linux-ipv6.be> MIME-Version: 1.0 X-Rspamd-Queue-Id: 443204451D37 X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:200533, ipnet:2001:67c:21bc::/48, country:BG]; IP_WHITELIST(0.00)[2001:67c:21bc:20::10] X-Rspamd-Server: skulls X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210815_035139_035454_3F1A9E95 X-CRM114-Status: GOOD ( 11.01 ) X-Spam-Score: 0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: When building umbim with GCC 10, a bunch of these errors appear: cli.c: In function 'mbim_device_caps_response': cli.c:55:29: error: taking address of packed member of 'struct mbim_basic_connect_device_caps_r' may result in an unaligned pointer value [-Werror=addre [...] Content analysis details: (0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.1 DKIM_INVALID DKIM or DK signature exists, but is not valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org When building umbim with GCC 10, a bunch of these errors appear: cli.c: In function 'mbim_device_caps_response': cli.c:55:29: error: taking address of packed member of 'struct mbim_basic_connect_device_caps_r' may result in an unaligned pointer value [-Werror=address-of-packed-member] 55 | deviceid = mbim_get_string(&caps->deviceid, buffer); | ^~~~~~~~~~~~~~~ Fix them by disabling padding between fields of struct mbim_string. This change will be committed to umbim.git and the package bumped in OpenWrt instead, after being acked. Signed-off-by: Stijn Tintel --- package/network/utils/umbim/patches/999-gcc10.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 package/network/utils/umbim/patches/999-gcc10.patch diff --git a/package/network/utils/umbim/patches/999-gcc10.patch b/package/network/utils/umbim/patches/999-gcc10.patch new file mode 100644 index 0000000000..7fdc410393 --- /dev/null +++ b/package/network/utils/umbim/patches/999-gcc10.patch @@ -0,0 +1,13 @@ +diff --git a/mbim-type.h b/mbim-type.h +index ddc36fa..fdbe684 100644 +--- a/mbim-type.h ++++ b/mbim-type.h +@@ -18,7 +18,7 @@ + struct mbim_string { + uint32_t offset; + uint32_t length; +-}; ++} __attribute__((packed)); + + struct mbim_enum { + uint32_t key;