FreeBSD libc does not accept NULL as a parameter

This commit is contained in:
Stephane Bortzmeyer 2004-02-20 12:50:04 +00:00
parent 3ef51cbc24
commit 781afc5c64

View File

@ -530,7 +530,7 @@ main (argc, argv)
memset (&hints_numeric, 0, sizeof (hints_numeric));
hints_numeric.ai_family = family;
hints_numeric.ai_flags = AI_NUMERICHOST;
error = getaddrinfo (server, port_name, &hints_numeric, NULL);
error = getaddrinfo (server, port_name, &hints_numeric, &res);
if (error && error == EAI_NONAME) /* A name, not an address */
{
if ((result =