Don't use <gnu/types.h> but <bits/types.h>.