
From: AKASHI Takahiro takahiro.akashi@linaro.org
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 takahiro.akashi@linaro.org --- 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 <common.h> +#ifdef CONFIG_FS_FAT + #include <asm/byteorder.h> #include <fs.h>
@@ -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_ */