From 6e933be9ecd4c86bb0e779c5a5307cb00da8c1db Mon Sep 17 00:00:00 2001 From: gardners Date: Thu, 3 May 2012 17:17:56 +0930 Subject: [PATCH] fixed bug on android with previous commit --- lsif.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lsif.c b/lsif.c index 3556d54e..bfc9764d 100644 --- a/lsif.c +++ b/lsif.c @@ -25,7 +25,7 @@ * http://teotwawki.steubentech.com/ * */ - #include +#include #include #include #include @@ -74,7 +74,7 @@ int lsif(void) /* Get a socket handle. */ sck = socket(PF_INET, SOCK_DGRAM, 0); if(sck < 0) { - WHY("Failed to gt socket handle to list addresses"); + fprintf(stderr,"Failed to gt socket handle to list addresses\n"); return 1; } @@ -82,14 +82,14 @@ int lsif(void) ifc.ifc_len = sizeof(buf); ifc.ifc_buf = buf; if(ioctl(sck, SIOCGIFCONF, &ifc) < 0) { - WHY("Failed to read interface list"); + fprintf(stderr,"Failed to read interface list\n"); return 1; } /* Iterate through the list of interfaces. */ ifr = ifc.ifc_req; nInterfaces = ifc.ifc_len / sizeof(struct ifreq); - WHYF("Examining %d interfaces",nInterfaces); + fprintf(stderr,"Examining %d interfaces\n",nInterfaces); for(i = 0; i < nInterfaces; i++) { item = &ifr[i];