glibc/tests/Regression/bz804630-Bad-resolution-with-IPv6-and-rotate-option-in/testcase.c
Sergey Kolosov ab4bc8a24e Extend the test coverage
Move some of the RHEL QE testcases upstream to Fedora.
2022-05-31 09:29:27 +02:00

29 lines
584 B
C

/* taken from Bug 804630 */
#include <stdio.h>
#include <stdlib.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/socket.h>
int main(void)
{
struct addrinfo *result;
struct addrinfo *res;
int error;
/* resolve the domain name into a list of addresses */
error = getaddrinfo("tak.tik.com", NULL, NULL, &result);
if (error != 0)
{
fprintf(stderr, "error in getaddrinfo: %s\n", gai_strerror(error));
return EXIT_FAILURE;
}
else
{
printf("Test OK\n");
}
freeaddrinfo(result);
return EXIT_SUCCESS;
}