|
@@ -61,8 +61,7 @@ long int gethostid(void)
|
|
* Mitch
|
|
* Mitch
|
|
*/
|
|
*/
|
|
if (gethostname(host, HOST_NAME_MAX) >= 0 && *host) {
|
|
if (gethostname(host, HOST_NAME_MAX) >= 0 && *host) {
|
|
- struct addrinfo hints, *results, *addr;
|
|
+ struct addrinfo hints = {.ai_family = AF_INET}, *results, *addr;
|
|
- memset(&hints, 0, sizeof(struct addrinfo));
|
|
|
|
if (!getaddrinfo(host, NULL, &hints, &results)) {
|
|
if (!getaddrinfo(host, NULL, &hints, &results)) {
|
|
for (addr = results; addr; addr = results->ai_next) {
|
|
for (addr = results; addr; addr = results->ai_next) {
|
|
|
|
|