--- libaitio/example/bpf.c 2013/06/25 09:26:49 1.1.2.3 +++ libaitio/example/bpf.c 2013/06/25 16:42:41 1.1.2.4 @@ -299,10 +299,12 @@ main(int argc, char **argv) else strlcpy(szStr, *argv, sizeof szStr); -#ifdef __FreeBSD_ - dev = io_etherOpen(szStr, O_RDWR | O_NONBLOCK, 42, (u_int*) &siz, &bz); +#ifdef __FreeBSD__ + dev = io_etherOpen(szStr, O_RDWR, 42, (u_int*) &siz, &bz); + if (dev == -1) + dev = io_etherOpen(szStr, O_RDWR, 42, (u_int*) &siz, NULL); #else - dev = io_etherOpen(szStr, O_RDWR | O_NONBLOCK, 42, (u_int*) &siz, NULL); + dev = io_etherOpen(szStr, O_RDWR, 42, (u_int*) &siz, NULL); #endif if (dev == -1) { printf("Error:: #%d - %s\n", io_GetErrno(), io_GetError());