summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2006-05-12 12:02:51 +0000
committerSimon Josefsson <simon@josefsson.org>2006-05-12 12:02:51 +0000
commit319274dce19f2746d5608c0cba622c1a81100ad3 (patch)
treef2ff94f3b502d9ada85e8e2a77c1269a371de26e
parent481b6f698ff0b69ab90b082d760d2feac5c46c92 (diff)
downloadgnutls-319274dce19f2746d5608c0cba622c1a81100ad3.tar.gz
Don't use AI_NUMERICSERV, it doesn't exist on most platforms.
-rw-r--r--src/serv.c2
-rw-r--r--src/tls_test.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/serv.c b/src/serv.c
index af0c8d4342..4673e2582f 100644
--- a/src/serv.c
+++ b/src/serv.c
@@ -517,7 +517,7 @@ listen_socket (const char *name, int listen_port)
snprintf (portname, sizeof (portname), "%d", listen_port);
memset (&hints, 0, sizeof (hints));
hints.ai_socktype = SOCK_STREAM;
- hints.ai_flags = AI_PASSIVE | AI_NUMERICSERV;
+ hints.ai_flags = AI_PASSIVE;
if ((s = getaddrinfo (NULL, portname, &hints, &res)) != 0)
{
diff --git a/src/tls_test.c b/src/tls_test.c
index 8f06385610..29fb1ba6ec 100644
--- a/src/tls_test.c
+++ b/src/tls_test.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000,2001,2002,2003 Nikos Mavroyanopoulos
+ * Copyright (C) 2000,2001,2002,2003,2006 Nikos Mavroyanopoulos
* Copyright (C) 2004,2005 Free Software Foundation
*
* This file is part of GNUTLS.
@@ -194,12 +194,12 @@ main (int argc, char **argv)
/* get server name */
memset (&hints, 0, sizeof (hints));
hints.ai_socktype = SOCK_STREAM;
- hints.ai_flags = AI_NUMERICSERV;
+ hints.ai_flags = 0;
snprintf (portname, sizeof (portname), "%d", port);
if ((err = getaddrinfo (hostname, portname, &hints, &res)) != 0)
{
fprintf (stderr, "Cannot resolve %s: %s\n", hostname,
- gai_strerror (err));
+ gai_strerror (err));
exit (1);
}