summaryrefslogtreecommitdiffstats
path: root/config.tests/unix/getifaddrs/getifaddrs.cpp
blob: 4e05a18fea76ac764ad45541f9c1d6d06851db68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* Sample program for configure to test for if_nametoindex support
on target platforms. */

#if defined(__hpux)
#define _HPUX_SOURCE
#endif

#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
#include <ifaddrs.h>

int main()
{
    ifaddrs *list;
    getifaddrs(&list);
    freeifaddrs(list);
    return 0;
}