aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dcc.c3
-rw-r--r--lib/ftutil.c4
-rw-r--r--lib/ftutil.h4
3 files changed, 7 insertions, 4 deletions
diff --git a/dcc.c b/dcc.c
index c54e9169..b6345a92 100644
--- a/dcc.c
+++ b/dcc.c
@@ -668,6 +668,9 @@ file_transfer_t *dcc_request( struct im_connection *ic, char *line )
filesize = atoll( input + pmatch[9].rm_so );
memset( &hints, 0, sizeof ( struct addrinfo ) );
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = AI_NUMERICSERV;
+
if ( ( gret = getaddrinfo( host, port, &hints, &rp ) ) )
{
g_free( input );
diff --git a/lib/ftutil.c b/lib/ftutil.c
index cfe06006..169a6480 100644
--- a/lib/ftutil.c
+++ b/lib/ftutil.c
@@ -37,10 +37,6 @@
#endif
#endif
-#ifndef AI_NUMERICSERV
-#define AI_NUMERICSERV 0x0400 /* Don't use name resolution. */
-#endif
-
#define ASSERTSOCKOP(op, msg) \
if( (op) == -1 ) {\
sprintf( errmsg , msg ": %s", strerror( errno ) ); \
diff --git a/lib/ftutil.h b/lib/ftutil.h
index 5f2780ef..636fcbd0 100644
--- a/lib/ftutil.h
+++ b/lib/ftutil.h
@@ -21,4 +21,8 @@
* *
\***************************************************************************/
+#ifndef AI_NUMERICSERV
+#define AI_NUMERICSERV 0x0400 /* Don't use name resolution. */
+#endif
+
int ft_listen( struct sockaddr_storage *saddr_ptr, char *host, char *port, int for_bitlbee_client, char **errptr );