From patchwork Thu Nov 10 15:17:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rong Tao X-Patchwork-Id: 18163 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp208954wru; Thu, 10 Nov 2022 07:22:35 -0800 (PST) X-Google-Smtp-Source: AMsMyM40Sd3EJZ1jMKqxoB9WdFsnnz7GWriHeyrRQujsSXGtYGpCTLTEr+uY+rhBAQIq/Eaqk52w X-Received: by 2002:a17:906:5a6a:b0:7a6:bad5:8295 with SMTP id my42-20020a1709065a6a00b007a6bad58295mr60954659ejc.647.1668093755349; Thu, 10 Nov 2022 07:22:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668093755; cv=none; d=google.com; s=arc-20160816; b=TEsNczkldF9I+bb7H9Pwh2DCjwbtd94ojGjvjhsE5kkCeKnoIYsje9jnDbl7z72Y77 llbtCPvmlePprxmm8ohpNY+5zLIGlB7vtstsyvow5XXXY9aaqEvZL67Rk9CLoMDMvAl4 FOOskgvnZFt7SiEb+MRwKteB35z4FtvjyQmi4YL3Aq0QksNkl3gTqt1kPc9og2WSd6ZW 5c0Gcqqw9xPTP40tIFdhp5HdZtOS5/DtJw0aPjtlUXUEzkRNRTQjo0J7HYpRDdsrPL64 1N6hGCPQfYNo2E2ghy4ShChAf/AoeDg/2J9ZX1w1i2YDArzeekDGEVSfwWTGDY5d4O4f KPaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :subject:cc:to:from:message-id:dkim-signature; bh=WKAaVON2ncuiTViXUV+2Pk+5RbBLa1ZdK2Z4ndXxZMQ=; b=aeNaVhnjRhtRQVB6XVptxxviVUeWxL93Z+9/jCJGHOj8vRRCprcQMeztQtyYVRJ0HR kanGzSR5ydZeEFwAswN97LAq5REIy7VTZMGVDUoDVn5cn0p3t6/651udAJPZlgmcRV2n Xfr3+bQe9jRYE8K7EtiaUAvcmiUrrcNHv9UwJQiJXqzlwxgzW6OHCiWGoVSkrCTyaG+D UkPpA+2vwCZNcie2+3/XxMoN7yewTLQf7RvTyuCDTI59hPt09lEO0ZqcXttRuVZSLvlh 7VsTrz+ji5OycPS+uY/LxoAYGkokYyObNz4fzyxwT0F8ybmZ8cZWtWvH73FrqiVrdehS rWlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foxmail.com header.s=s201512 header.b=pQnqhmtI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j20-20020a05640211d400b00461bff75d84si21329868edw.463.2022.11.10.07.22.11; Thu, 10 Nov 2022 07:22:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@foxmail.com header.s=s201512 header.b=pQnqhmtI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231481AbiKJPTs (ORCPT + 99 others); Thu, 10 Nov 2022 10:19:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231551AbiKJPTZ (ORCPT ); Thu, 10 Nov 2022 10:19:25 -0500 Received: from out203-205-251-66.mail.qq.com (out203-205-251-66.mail.qq.com [203.205.251.66]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3947F1F9E4; Thu, 10 Nov 2022 07:18:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1668093515; bh=WKAaVON2ncuiTViXUV+2Pk+5RbBLa1ZdK2Z4ndXxZMQ=; h=From:To:Cc:Subject:Date; b=pQnqhmtIbEmvHoXq1aE7qIGgcoxR0pN4NNxRxH0jcN9BJiDKIktU4vI1nNJcxOQ4J yAPWpU0lZrg9GEyhAwjNnLeFAVGVcvut9AYAiSUQSC46qmWDR7NoCUwWsoJZuFKq9n QaT+IdFdI8hcbQjkiFZ++fqZg7gmQnoIhSWKX1c0= Received: from localhost.localdomain ([111.199.191.46]) by newxmesmtplogicsvrszb9-0.qq.com (NewEsmtp) with SMTP id 4542142F; Thu, 10 Nov 2022 23:17:20 +0800 X-QQ-mid: xmsmtpt1668093440tv75ycliw Message-ID: X-QQ-XMAILINFO: M7uElAZZZMmFzi406KAbOEUgH0eGd75eD6bJqID8rYRD5CrJERuxDIF0WfeAdX 9jOU7DAdGKxOFYXWDsC34QRU938KhVZumwwYUl1gwPNEzU7lruJ7tCaDoPHmM4bpNm8osR4667+Z /k0xfRURYd8v6yQY7rCqx0Fu61FNzR1YbMxA8ATQXtSn7ALy6buG6UrvEl7V8NaYtZiKCIHNVPFf sk3knfOzCmB08uCnMTiQ99flslita/eYY48uVapJxPaJZeZLrgBUQEASa/U0Pb7VX2oukbX6J6hZ mGAY/8uQts+kb++ROdfYYmYMC/R+d9TWWotPNNq5TYy9ubk/Fau7KiWSV2GMr5RSirHzqB3dmazv kMDXbINCHqP+sCAt8XIVEpWkOXnulk5jZXvbF4XVAnPnfBIommDv2PfbF67JiMFp4ZnbrZPGHq7w ZzhLln+LgOzLXtEIxpI/U6Vsi3hNUhsHQk137ooL/J/nXL+lXA7P+GzxVyXGnjgDgvYMI9CM6YFb M2oBbRSykvzS05N/M9my/QjRSNdruDyzJKKZWnHcj6eMTSUUVJ4T7b4cGajdIBNVUtAoSpCrgh/p mdvWA5Refy5skFGFWYYiyP9TpuVj2Ss3zuAFwwWgYZ/6ZroAaB+e+GXNumKDAWC/vFPO5aicSRIt wHKvzBRuLScGua9PyYVF/y7CCgoQlZv94z67ak81fcff/I7TfSN3Uc5xRDXzFUQr3sWzTW8rzDC9 DUoh24GIhG02CdyvrDR9uJzYZi6caPyryWZEqdnUS49vynvYbIQjrmzAL8Y6uvvXeBicyLGNxLS9 73NLk70kim0EAnJ/nJdjnoM+U2QQrRxvHNAthjwJf9pwJqdf/rc4j83Js9YBMFtX3/LRKEy3wyQA tes0k32SwsEIW8yR4lRkjgJXXgn7ISpgw+dH/BST3xf5RXavBc9IzfuTPBvrIpVySVTGZbYawyHh OVM9y4GEYi6qel8XYDVNItlR06K4wHEwgM1G2rgu6uOCJShR3TWw== From: Rong Tao To: davem@davemloft.net Cc: Rong Tao , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Arnaldo Carvalho de Melo , netdev@vger.kernel.org (open list:NETWORKING [GENERAL]), linux-kernel@vger.kernel.org (open list), bpf@vger.kernel.org (open list:BPF [MISC]) Subject: [PATCH] net/ipv4: Fix error: type name requires a specifier or qualifier Date: Thu, 10 Nov 2022 23:17:12 +0800 X-OQ-MSGID: <20221110151712.40621-1-rtoax@foxmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, HELO_DYNAMIC_IPADDR,RCVD_IN_DNSWL_NONE,RDNS_DYNAMIC,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749123077617106627?= X-GMAIL-MSGID: =?utf-8?q?1749123077617106627?= From: Rong Tao since commit 5854a09b4957("net/ipv4: Use __DECLARE_FLEX_ARRAY() helper") linux/in.h use __DECLARE_FLEX_ARRAY() macro, and sync to tools/ in commit 036b8f5b8970("tools headers uapi: Update linux/in.h copy"), this macro define in linux/stddef.h, which introduced in commit 3080ea5553cc("stddef: Introduce DECLARE_FLEX_ARRAY() helper"), thus, stddef.h should be included in in.h, which resolves the compilation error below: How to reproduce this compilation error: $ make -C tools/testing/selftests/bpf/ In file included from progs/bpf_flow.c:8: linux/in.h:199:3: error: type name requires a specifier or qualifier __DECLARE_FLEX_ARRAY(__be32, imsf_slist_flex); ^ linux/in.h:199:32: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int] __DECLARE_FLEX_ARRAY(__be32, imsf_slist_flex); ^ 2 errors generated. Same error occurs with cgroup_skb_sk_lookup_kern.c, connect_force_port4.c, connect_force_port6.c, etc. that contain the header linux/in.h. Signed-off-by: Rong Tao --- include/uapi/linux/in.h | 1 + tools/include/uapi/linux/in.h | 1 + 2 files changed, 2 insertions(+) diff --git a/include/uapi/linux/in.h b/include/uapi/linux/in.h index f243ce665f74..07a4cb149305 100644 --- a/include/uapi/linux/in.h +++ b/include/uapi/linux/in.h @@ -20,6 +20,7 @@ #define _UAPI_LINUX_IN_H #include +#include #include #include diff --git a/tools/include/uapi/linux/in.h b/tools/include/uapi/linux/in.h index f243ce665f74..07a4cb149305 100644 --- a/tools/include/uapi/linux/in.h +++ b/tools/include/uapi/linux/in.h @@ -20,6 +20,7 @@ #define _UAPI_LINUX_IN_H #include +#include #include #include