pkgsrc/net/microdc2/patches/patch-aa
heinz 273124ca69 Initial import of microdc2 0.15.6.
Packaged and maintained by Dennis den Brok, with small changes by me.
This should fix PR pkg/36887 by Dennis.

microdc2 is the successor of microdc, a command-line based Direct Connect
client written in C and designed to compile and run on modern POSIX
compatible systems.
Direct Connect is a file sharing network made up by hubs, to which
clients can connect. Once connected to a hub, the user can search for
files on the hub or the network, or browse files of other users connected
to the hub.
2007-09-16 15:53:12 +00:00

23 lines
979 B
Text

$NetBSD: patch-aa,v 1.1.1.1 2007/09/16 15:53:12 heinz Exp $
Provide hints for getaddrinfo(), otherwise there is not enough data
to determine the correct address information.
Works on NetBSD and Linux.
AF_UNSPEC could not be used because IPv6 address information confuses the
application.
--- src/hub.c.orig 2006-12-24 19:41:44.000000000 +0100
+++ src/hub.c
@@ -316,10 +316,11 @@ hub_new(const char *hostname, uint16_t p
hub_connect(&addr); /* Ignore errors */
} else {
char portstr[6];
+ struct addrinfo hints = { 0, AF_INET, SOCK_STREAM, 0, };
sprintf(portstr, "%" PRIu16, port);
screen_putf(_("Looking up IP address for %s\n"), quotearg(hostname));
- hub_lookup = add_lookup_request(hostname, portstr, NULL, hub_address_looked_up, xstrdup(hostname));
+ hub_lookup = add_lookup_request(hostname, portstr, &hints, hub_address_looked_up, xstrdup(hostname));
hub_state = DC_HUB_LOOKUP;
}
}