Re: Bug #619684: ns2: FTBFS on kfreebsd-*: emulate/net-pcap.cc:537:19: error: 'BIOCIMMEDIATE' was not declared in this scope
I got it.
It used it like this
#if !defined(__linux__)&&!defined(__APPLE__)
{
int immed = 1;
if (ioctl(pfd_, BIOCIMMEDIATE, &immed) < 0) {
fprintf(stderr,
"warning: pcap/live (%s) couldn't set immed\n",
name());
perror("ioctl(BIOCIMMEDIATE)");
}
}
#endif
On linux , BIOCIMMEDIATE is not used, but on BSD, it did being used,
but did *not* include net/bpf.h
Then there are 2 ways to fix this bug:
1. also disable the above code block on BSD.
2. include net/bpf.h on BSD platform.
Which one is better ?
--
YunQiang Su
Reply to: