fibmap: include f2fs_fs.h before other header files
authorSheng Yong <shengyong1@huawei.com>
Tue, 27 Feb 2018 08:39:33 +0000 (16:39 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 7 May 2018 21:49:38 +0000 (14:49 -0700)
commit4d4a9f2d4594f43b486cda79fff9f7d19e4a4d36
treeb22c5acb2358a0624350f4cdf36afee20516f279
parentc265813af3eda31f5f745ce5ba0df3420c62b548
fibmap: include f2fs_fs.h before other header files

GCC 7.2.0 is unhappy with the usage of major/minor:

fibmap.c: In function â€˜print_stat’:
fibmap.c:70:13: warning: In the GNU C Library, "major" is defined
 by <sys/sysmacros.h>. For historical compatibility, it is
 currently defined by <sys/types.h> as well, but we plan to
 remove this soon. To use "major", include <sys/sysmacros.h>
 directly. If you did not intend to use a system-defined macro
 "major", you should undefine it after including <sys/types.h>.
  printf("dev       [%d:%d]\n", major(st->st_dev), minor(st->st_dev));
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is because config.h is not included first, as a result, macros
defined in config.h is not recognized. So let's include f2fs_fs.h
before other header files.

Signed-off-by: Sheng Yong <shengyong1@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
tools/fibmap.c