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: 13038897 X-Patchwork-Delegate: kuba@kernel.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F60EC43217 for ; Thu, 10 Nov 2022 15:19:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231549AbiKJPTr (ORCPT ); Thu, 10 Nov 2022 10:19:47 -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 Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org 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