include sys/types.h in buffer.h