mirror of https://github.com/mkerrisk/man-pages
Improvements for example program
This commit is contained in:
parent
a15ae69ad6
commit
59cef12337
|
@ -487,6 +487,9 @@ main(int argc, char *argv[])
|
|||
hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */
|
||||
hints.ai_flags = AI_PASSIVE; /* For wildcard IP address */
|
||||
hints.ai_protocol = 0; /* Any protocol */
|
||||
hints.ai_canonname = NULL;
|
||||
hints.ai_addr = NULL;
|
||||
hints.ai_next = NULL;
|
||||
|
||||
s = getaddrinfo(NULL, argv[1], &hints, &result);
|
||||
if (s != 0) {
|
||||
|
|
Loading…
Reference in New Issue