From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akashi, Takahiro Date: Wed, 12 Sep 2018 15:55:41 +0900 Subject: [U-Boot] [PATCH v3.1 01/26] fs: fat: guard the content of include/fat.h In-Reply-To: <20180911065922.19141-2-takahiro.akashi@linaro.org> References: <20180911065922.19141-2-takahiro.akashi@linaro.org> Message-ID: <20180912065541.6251-1-takahiro.akashi@linaro.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: AKASHI Takahiro The whole content of include/fat.h should be guarded with CONFIG_FS_FAT. This is necessary specifically because fs/fs.c unconditionally includes fat.h, which refers to a config symbol, CONFIG_FS_FAT_MAX_CLUSTSIZE. So if CONFIG_FS_FAT, and thus CONFIG_FS_FAT_MAX_CLUSTSIZE, is not defined, fs/fs.c will fail to compile. Signed-off-by: AKASHI Takahiro --- include/fat.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/fat.h b/include/fat.h index 09e142368585..8bc280e872ba 100644 --- a/include/fat.h +++ b/include/fat.h @@ -9,6 +9,9 @@ #ifndef _FAT_H_ #define _FAT_H_ +#include +#ifdef CONFIG_FS_FAT + #include #include @@ -202,4 +205,5 @@ int fat_opendir(const char *filename, struct fs_dir_stream **dirsp); int fat_readdir(struct fs_dir_stream *dirs, struct fs_dirent **dentp); void fat_closedir(struct fs_dir_stream *dirs); void fat_close(void); +#endif /* CONFIG_FS_FAT */ #endif /* _FAT_H_ */ -- 2.18.0