*** netif_ls.c.orig 2003-02-14 00:20:04.000000000 +0900 --- netif_ls.c 2003-02-14 00:00:05.000000000 +0900 *************** *** 3,13 **** --- 3,23 ---- #include #include #include + #ifdef __linux__ + #include + #else #include + #endif #include #include #include + #ifdef _SIZEOF_ADDR_IFREQ + #define SIZEOF_IFREQ(x) _SIZEOF_ADDR_IFREQ(x) + #else + #define SIZEOF_IFREQ(x) sizeof(struct ifreq) + #endif + main() { int s; *************** *** 42,48 **** free( buf); } ! for( i = 0; i < lastlen; i += _SIZEOF_ADDR_IFREQ(*ifr)){ struct ifreq ifrtmp; struct sockaddr_in* sin; --- 52,58 ---- free( buf); } ! for( i = 0; i < lastlen; i += SIZEOF_IFREQ(*ifr)){ struct ifreq ifrtmp; struct sockaddr_in* sin;