The dir routines take either a struct buffer * or a struct DirEntry * depending on whether you're in kernel or user. This is pretty silly and it would be nice if someone could fix this, maybe with unions or void *. I don't see a cvs tag for 1.3.52, so I don't know which versions of the files you are getting, but this was broken for a while. Can do a cvs up -r HEAD on src/dir and try again?