diff options
author | Michael Adam <obnox@samba.org> | 2008-02-28 21:44:31 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-02-28 23:01:15 +0100 |
commit | c9fb4f05f42209ed383e4e84954b549687fe6d6d (patch) | |
tree | 3b0cac361433289496ca5955240ea8256a35974a /source4/lib/replace/getifaddrs.c | |
parent | dfc84928d722191dad264a7206e20919c140e3ea (diff) | |
download | samba-c9fb4f05f42209ed383e4e84954b549687fe6d6d.tar.gz samba-c9fb4f05f42209ed383e4e84954b549687fe6d6d.tar.bz2 samba-c9fb4f05f42209ed383e4e84954b549687fe6d6d.zip |
libreplace: use the new getifaddrs test also for autoconf.
Michael
(This used to be commit a2a506ff0eae2a64ebe2ddbb81a6c2a5fa7fe3da)
Diffstat (limited to 'source4/lib/replace/getifaddrs.c')
-rw-r--r-- | source4/lib/replace/getifaddrs.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/source4/lib/replace/getifaddrs.c b/source4/lib/replace/getifaddrs.c index 053657475d..551ff863df 100644 --- a/source4/lib/replace/getifaddrs.c +++ b/source4/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 |