> -8. The compiler will warn if you get it right.
> bind() socket library call ... takes a struct sockaddr [when you are usually using a struct sockaddr_in]
Except the compiler is correct. If you want to use a polymorphic type in a generic call that requires the parent type, you should include a cast.
From the example in my man page for bind(2):
int main(int argc, char *argv[])
{
int sfd;
struct sockaddr_un my_addr;
/* ... */
if (bind(sfd, (struct sockaddr *) &my_addr,
sizeof(struct sockaddr_un)) == -1)
handle_error("bind");
/* ,,, */