Back to index

glibc  2.9
bug-ga1.c
Go to the documentation of this file.
00001 /* Test case by Anders Carlsson <andersca@gnome.org>.  */
00002 #include <sys/types.h>
00003 #include <sys/socket.h>
00004 #include <netdb.h>
00005 #include <stdio.h>
00006 #include <string.h>
00007 
00008 int
00009 main (void)
00010 {
00011   struct addrinfo req, *ai;
00012   char name[] = "3ffe:0200:0064:0000:0202:b3ff:fe16:ddc5";
00013 
00014   memset (&req, '\0', sizeof req);
00015   req.ai_family = AF_INET6;
00016 
00017   /* This call used to crash.  We cannot expect the test machine to have
00018      IPv6 enabled so we just check that the call returns.  */
00019   getaddrinfo (name, NULL, &req, &ai);
00020 
00021   puts ("success!");
00022   return 0;
00023 }