The header was not self-contained, it was missing definitions for some types included in <sys/types.h>.