Blame posix/bug-ga1.c

Packit 6c4009
/* Test case by Anders Carlsson <andersca@gnome.org>.  */
Packit 6c4009
#include <sys/types.h>
Packit 6c4009
#include <sys/socket.h>
Packit 6c4009
#include <netdb.h>
Packit 6c4009
#include <stdio.h>
Packit 6c4009
#include <string.h>
Packit 6c4009
Packit 6c4009
int
Packit 6c4009
main (void)
Packit 6c4009
{
Packit 6c4009
  struct addrinfo req, *ai;
Packit 6c4009
  char name[] = "3ffe:0200:0064:0000:0202:b3ff:fe16:ddc5";
Packit 6c4009
Packit 6c4009
  memset (&req, '\0', sizeof req);
Packit 6c4009
  req.ai_family = AF_INET6;
Packit 6c4009
Packit 6c4009
  /* This call used to crash.  We cannot expect the test machine to have
Packit 6c4009
     IPv6 enabled so we just check that the call returns.  */
Packit 6c4009
  getaddrinfo (name, NULL, &req, &ai;;
Packit 6c4009
Packit 6c4009
  puts ("success!");
Packit 6c4009
  return 0;
Packit 6c4009
}