Merge from vendor branch TNF:
[pkgsrcv2.git] / www / lynx / patches.v6 / patch-ay
1 $NetBSD: patch-ay,v 1.1 2000/01/15 17:44:26 hubertf Exp $
2
3 diff -x *.orig -urN ./src/LYUtils.c /usr/pkgsrc/www/lynx/work.unpatched/lynx2-8-2/src/LYUtils.c
4 --- ./src/LYUtils.c     Sun May 30 05:27:26 1999
5 +++ /usr/pkgsrc/www/lynx/work.unpatched/lynx2-8-2/src/LYUtils.c Sat Jan 15 07:57:20 2000
6 @@ -4298,6 +4298,8 @@
7      char *Fragment = NULL;
8      BOOLEAN GotHost = FALSE;
9      BOOLEAN Startup = (helpfilepath == NULL);
10 +    struct addrinfo hints, *res;
11 +    int error;
12  
13      /*
14       * If it's a NULL or zero-length string,
15 @@ -4370,7 +4372,12 @@
16         fprintf(stdout, "%s '%s'%s\n", WWW_FIND_MESSAGE, host, FIRST_SEGMENT);
17      }
18  #ifndef DJGPP
19 -    if (LYGetHostByName(host) != NULL)
20 +    memset(&hints, 0, sizeof(hints));
21 +    hints.ai_family = PF_UNSPEC;
22 +    hints.ai_socktype = SOCK_STREAM;
23 +    error = getaddrinfo(host, "80", &hints, &res); 
24 +
25 +    if (!error && res)
26  #else
27      if (resolve(host) != 0)
28  #endif /* DJGPP */