The attached patch is long but the bulk of it consists of adding yaffs_ in front of all the list_ bits so as to avoid name collision.
The remainder of it does the following:
1) Add initializers to variable declarations to get gcc to shut up about them.
2) Removes unused declarations to get gcc to shut up about them.
3) Changes some variable names in inner blocks to get gcc to shut up about aliasing
4) Changes a format to match types (%d -> %lu) to get gcc to shut up about wrong format strings.
5) Reference yaffs_qsort.h in yaffs_qsort.c to get gcc to shut up about no prototype.
6) Ifdef out a pair of functions in yaffs_guts.c that aren't used in NetBSD, using the new CONFIG_NETBSD flag
7) Add CONFIG_NETBSD flag and reference it in yportenv.h to cause ynetbsdenv.h to be included in a NetBSD build.
I have not included ynetbsdenv.h in the patch, as I am releasing the patch to Aleph1, but I don't yet have the authority to release parts of the actual netbsd port.
All of the changes made *should* be cosmetic on a yaffs Linux or yaffs direct port, but I don't have either to test against.
Marty