tdb.h contains mode_t in structures but does not include whether sys/types.h or sys/stat.h. Therefore applications including tdb.h without including sys/types.h or sys/stat.h first will fail to compile.