}
memcpy(&sin->sin_addr, hp->h_addr, hp->h_length);
- *salen = hp->h_length;
+ *salen = sizeof(struct sockaddr_in);
return 1;
}
#endif /* HAVE_DECL_AI_ADDRCONFIG */
strcat(buf, "unknown host");
}
- fprintf(stderr, _("%s: trying %s prog %ld vers %ld prot %s port %d\n"),
- progname, buf, program, version,
+ fprintf(stderr, _("%s: trying %s prog %lu vers %lu prot %s port %d\n"),
+ progname, buf, (unsigned long)program,
+ (unsigned long)version,
(protocol == IPPROTO_UDP ? _("UDP") : _("TCP")),
port);
}