Logged In: NO

Part of these are caused by the compilation using the
_XOPEN_SOURCE #define. This causes struct timeval not to be
declared.
The vfs.h problems are a bit nastier.