For glibc 2.2.3 + , SA_LEN is not supported, then I have to use: # ifndef NO_LIBC_SA_LEN # define SA_LEN(_x) __libc_sa_len((_x)->sa_family) extern int __libc_sa_len (sa_family_t __af) __THROW; # endif and it works?.