Added explicit sockaddr typecasts (sockaddr_un not acceptable on OS X).