--- libaitio/example/bpf.c 2013/12/15 22:57:20 1.4 +++ libaitio/example/bpf.c 2016/08/11 16:23:43 1.4.12.2 @@ -1,3 +1,10 @@ +#ifdef __linux__ +int main() +{ + return 0; +} +#else + #include #include #include @@ -248,7 +255,7 @@ main(int argc, char **argv) u_int n, count = (u_int) -1; register int i; int dev, fd, ret, siz = 0; - char szStr[BUFSIZ], szEA[STRSIZ], szMap[MAXPATHLEN] = { 0 }, *buffer = NULL; + char szStr[BUFSIZ], szMap[MAXPATHLEN] = { 0 }, *buffer = NULL; struct ifreq ifr; struct pollfd pfd = { 0 }; pthread_t tid; @@ -291,10 +298,6 @@ main(int argc, char **argv) else strlcpy(szStr, *argv, sizeof szStr); - printf("io_getmaciface(%s) -> %d\n", szStr, io_getmaciface(szStr, &ea)); - e_ether_ntoa(&ea, szEA, sizeof szEA); - printf("ethernet address is %s\n", szEA); - #ifdef __FreeBSD__ dev = io_etherOpen(szStr, O_RDWR | O_NONBLOCK, 42, 0, (u_int*) &siz, (flg) ? &bz : NULL); if (dev == -1) @@ -375,3 +378,5 @@ main(int argc, char **argv) printf("0.%09lu per/iteration\n", ts_end.tv_sec + ts_end.tv_nsec / i); return 0; } + +#endif