Include bits/types.h instead of sys/types.h.