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 E5444C678DB for ; Sat, 4 Mar 2023 14:29:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229609AbjCDO3O (ORCPT ); Sat, 4 Mar 2023 09:29:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229534AbjCDO3F (ORCPT ); Sat, 4 Mar 2023 09:29:05 -0500 Received: from 1wt.eu (wtarreau.pck.nerim.net [62.212.114.60]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5101293E7 for ; Sat, 4 Mar 2023 06:29:04 -0800 (PST) Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 324ESuTI006573; Sat, 4 Mar 2023 15:28:56 +0100 From: Willy Tarreau To: paulmck@kernel.org Cc: chenhuacai@loongson.cn, chenfeiyang@loongson.cn, linux-kernel@vger.kernel.org, Willy Tarreau Subject: [PATCH 4/5] tools/nolibc: Include linux/fcntl.h and remove duplicate code Date: Sat, 4 Mar 2023 15:28:43 +0100 Message-Id: <20230304142844.6522-5-w@1wt.eu> X-Mailer: git-send-email 2.17.5 In-Reply-To: <20230304142844.6522-1-w@1wt.eu> References: <20230304142844.6522-1-w@1wt.eu> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Feiyang Chen Include linux/fcntl.h for O_* and AT_*. asm/fcntl.h is included by linux/fcntl.h, so it can be safely removed. Signed-off-by: Feiyang Chen Acked-by: Huacai Chen Signed-off-by: Willy Tarreau --- tools/include/nolibc/sys.h | 2 +- tools/include/nolibc/types.h | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h index 115579e7f1db..41cad6d6137e 100644 --- a/tools/include/nolibc/sys.h +++ b/tools/include/nolibc/sys.h @@ -11,7 +11,6 @@ #include "std.h" /* system includes */ -#include // for O_* #include #include // for SIGCHLD #include @@ -20,6 +19,7 @@ #include #include #include +#include // for O_* and AT_* #include "arch.h" #include "errno.h" diff --git a/tools/include/nolibc/types.h b/tools/include/nolibc/types.h index 47a0997d2d74..10823e5ac44b 100644 --- a/tools/include/nolibc/types.h +++ b/tools/include/nolibc/types.h @@ -81,11 +81,6 @@ #define MAXPATHLEN (PATH_MAX) #endif -/* Special FD used by all the *at functions */ -#ifndef AT_FDCWD -#define AT_FDCWD (-100) -#endif - /* whence values for lseek() */ #define SEEK_SET 0 #define SEEK_CUR 1 -- 2.17.5