--- libaitio/example/bpf.c 2013/06/25 09:22:10 1.1.2.2 +++ libaitio/example/bpf.c 2013/06/25 09:26:49 1.1.2.3 @@ -263,9 +263,7 @@ main(int argc, char **argv) pthread_t tid; char ch, mode = 'R'; struct timespec ts_start, ts_end; -#ifdef __FreeBSD__ - struct bpf_zbuf *bz; -#endif + void *bz = NULL; while ((ch = getopt(argc, argv, "hvwzs:p:f:")) != -1) switch (ch) { @@ -302,9 +300,9 @@ main(int argc, char **argv) strlcpy(szStr, *argv, sizeof szStr); #ifdef __FreeBSD_ - dev = io_etherOpen(szStr, O_RDWR | O_NONBLOCK, 42, &siz, &bz); + dev = io_etherOpen(szStr, O_RDWR | O_NONBLOCK, 42, (u_int*) &siz, &bz); #else - dev = io_etherOpen(szStr, O_RDWR | O_NONBLOCK, 42, &siz, NULL); + dev = io_etherOpen(szStr, O_RDWR | O_NONBLOCK, 42, (u_int*) &siz, NULL); #endif if (dev == -1) { printf("Error:: #%d - %s\n", io_GetErrno(), io_GetError());