In network.h, there's only struct sockaddr and struct sockaddr_in, but no struct sockaddr_storage. struct sockaddr_storage is defined by POSIX. It should be a struct big enough to hold any sockaddr_* struct in the system. The following simple definition will suffice: