diff options
author | Michael Adam <obnox@samba.org> | 2008-02-28 21:44:31 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-02-29 09:31:02 +0100 |
commit | ca237a3ad31a8bba18297042df670e3a710ca10e (patch) | |
tree | 88b8e58fc2ff04fc7f5e73677a1a0bcdae9f91e4 /source3/lib/replace/getifaddrs.c | |
parent | d24f3b8a9367cb3903e1d76fa66a14389554da33 (diff) | |
download | samba-ca237a3ad31a8bba18297042df670e3a710ca10e.tar.gz samba-ca237a3ad31a8bba18297042df670e3a710ca10e.tar.bz2 samba-ca237a3ad31a8bba18297042df670e3a710ca10e.zip |
libreplace: use the new getifaddrs test also for autoconf.
Michael
(cherry picked from commit a2a506ff0eae2a64ebe2ddbb81a6c2a5fa7fe3da)
(This used to be commit c5932414fdf0b568cbfe6cdefaec41c8afc8ca6b)
Diffstat (limited to 'source3/lib/replace/getifaddrs.c')
-rw-r--r-- | source3/lib/replace/getifaddrs.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/source3/lib/replace/getifaddrs.c b/source3/lib/replace/getifaddrs.c index 053657475d..551ff863df 100644 --- a/source3/lib/replace/getifaddrs.c +++ b/source3/lib/replace/getifaddrs.c @@ -363,32 +363,3 @@ int rep_getifaddrs(struct ifaddrs **ifap) return -1; } #endif - -#ifdef AUTOCONF_TEST -/* this is the autoconf driver to test getifaddrs() */ - - int main() -{ - struct ifaddrs *ifs = NULL; - int ret; - - ret = getifaddrs(&ifs); - if (ret != 0) { - perror("getifaddrs() failed"); - return 1; - } - - while (ifs) { - printf("%-10s ", ifs->ifa_name); - if (ifs->ifa_addr != NULL && - ifs->ifa_addr->sa_family == AF_INET) { - printf("IP=%s ", inet_ntoa(((struct sockaddr_in *)ifs->ifa_addr)->sin_addr)); - if (ifs->ifa_netmask != NULL) - printf("NETMASK=%s", inet_ntoa(((struct sockaddr_in *)ifs->ifa_netmask)->sin_addr)); - } - printf("\n"); - ifs = ifs->ifa_next; - } - return 0; -} -#endif |