Build was failing due to a conflict with FreeBSD's fdclose(3). On FreeBSD it's declared as: int fdclose(FILE *stream, int *fdp); -- Christos