summaryrefslogtreecommitdiffstats
path: root/config.tests/unix/getaddrinfo/getaddrinfotest.cpp
blob: 9dcd03065ed9e098995ad2c301a178a347a0968a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* Sample program for configure to test for getaddrinfo on the unix
     platform. we check for all structures and functions required. */

#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>

int main()
{
    addrinfo *res = 0;
    if (getaddrinfo("foo", 0, 0, &res) == 0)
        freeaddrinfo(res);
    gai_strerror(0);
    
    return 0;
}