on ubuntu 14.04  , in the utils dir and do 'make' command  the context is 

tankhao@tankhao-OptiPlex-380:/opt/materia/code/pro/git/yaffs/yaffs2/utils$ make
ln -s ../yaffs_packedtags2.c yaffs_packedtags2.c
ln -s ../yaffs_ecc.c yaffs_ecc.c
ln -s ../yaffs_ecc.h yaffs_ecc.h
ln -s ../yaffs_guts.h yaffs_guts.h
ln -s ../yaffs_packedtags2.h yaffs_packedtags2.h
ln -s ../yaffs_trace.h yaffs_trace.h
ln -s ../direct/yaffs_hweight.c yaffs_hweight.c
ln -s ../direct/yportenv.h yportenv.h
ln -s ../direct/yaffs_hweight.h yaffs_hweight.h
ln -s ../direct/yaffs_list.h yaffs_list.h
gcc -c -O2 -Wall -DCONFIG_YAFFS_UTIL -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline mkyaffsimage.c -o mkyaffsimage.o
In file included from yutilsenv.h:26:0,
                 from yportenv.h:85,
                 from yaffs_guts.h:19,
                 from mkyaffsimage.c:31:
yaffs_hweight.h:21:20: error: unknown type name ¡®u8¡¯
 int yaffs_hweight8(u8 x);
                    ^
yaffs_hweight.h:22:21: error: unknown type name ¡®u32¡¯
 int yaffs_hweight32(u32 x);
                     ^
In file included from mkyaffsimage.c:31:0:
yaffs_guts.h:138:2: error: unknown type name ¡®u8¡¯
  u8 *data;
  ^
yaffs_guts.h:147:2: error: unknown type name ¡®u32¡¯
  u32 chunk_id:20;
  ^
yaffs_guts.h:148:2: error: unknown type name ¡®u32¡¯
  u32 serial_number:2;
  ^
yaffs_guts.h:149:2: error: unknown type name ¡®u32¡¯
  u32 n_bytes_lsb:10;
.........

tank_hao@foxmail.com