]>
Commit | Line | Data |
---|---|---|
380f06d3 UD |
1 | #include <sys/types.h> |
2 | #include <sys/socket.h> | |
3 | #include <netdb.h> | |
4 | #include <stdio.h> | |
4ba3c746 | 5 | #include <string.h> |
380f06d3 UD |
6 | |
7 | int | |
8 | main (void) | |
9 | { | |
10 | struct addrinfo req, *ai; | |
11 | char name[] = "3ffe:0200:0064:0000:0202:b3ff:fe16:ddc5"; | |
12 | ||
13 | memset (&req, '\0', sizeof req); | |
14 | req.ai_family = AF_INET6; | |
15 | ||
16 | /* This call used to crash. We cannot expect the test machine to have | |
17 | IPv6 enabled so we just check that the call returns. */ | |
18 | getaddrinfo (name, NULL, &req, &ai); | |
19 | ||
20 | puts ("success!"); | |
21 | return 0; | |
22 | } |