Bug#619684: Bug #619684: ns2: FTBFS on kfreebsd-*: emulate/net-pcap.cc:537:19: error: 'BIOCIMMEDIATE' was not declared in this scope

2011-04-16 Thread Romain Francoise
Hi, I don't think this is a bug in libpcap; if your program uses BIOCIMMEDIATE then it needs to include net/bpf.h itself and not expect pcap's includes to do it. FWIW, with the following patch ns2 builds successfully for me on kfreebsd-amd64: Index: ns2-2.35~RC6/emulate/net-pcap.cc

Bug#619684: Bug #619684: ns2: FTBFS on kfreebsd-*: emulate/net-pcap.cc:537:19: error: 'BIOCIMMEDIATE' was not declared in this scope

2011-04-16 Thread YunQiang Su
于 2011年04月16日 17:39, Romain Francoise 写道: Hi, I don't think this is a bug in libpcap; if your program uses BIOCIMMEDIATE then it needs to include net/bpf.h itself and not expect pcap's includes to do it. FWIW, with the following patch ns2 builds successfully for me on kfreebsd-amd64:

Bug#619684: Bug #619684: ns2: FTBFS on kfreebsd-*: emulate/net-pcap.cc:537:19: error: 'BIOCIMMEDIATE' was not declared in this scope

2011-04-16 Thread Romain Francoise
YunQiang Su wzss...@gmail.com writes: /usr/include/net/bpf.h:63:8: error: redefinition of ‘struct bpf_program’ /usr/include/pcap/bpf.h:88:20: error: previous definition of ‘struct bpf_program’ Yes, the system's bpf.h must come first, as in my patch. -- Romain Francoise rfranco...@debian.org

Bug#619684: Bug #619684: ns2: FTBFS on kfreebsd-*: emulate/net-pcap.cc:537:19: error: 'BIOCIMMEDIATE' was not declared in this scope

2011-04-15 Thread Aron Xu
tags 619684 + help thanks CCing debian-bsd@l.d.o. http://bugs.debian.org/619684 Here we find the libpcap on GNU/Linux and GNU/kfreebsd are (almost, not very sure) the same, but the package fails to build on kfreebsd-* and hurd. Could you please help on this issue? Now we guess

Bug#619684: Bug #619684: ns2: FTBFS on kfreebsd-*: emulate/net-pcap.cc:537:19: error: 'BIOCIMMEDIATE' was not declared in this scope

2011-04-15 Thread Aron Xu
After lindi- and wzssyqa's test, the macro PCAP_DONT_INCLUDE_PCAP_BPF_H is not defined in Sid Debian GNU/kfreebsd, so the problem becomes a bit more complicated... Help, please! -- Regards, Aron Xu -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of

Bug#619684: Bug #619684: ns2: FTBFS on kfreebsd-*: emulate/net-pcap.cc:537:19: error: 'BIOCIMMEDIATE' was not declared in this scope

2011-04-15 Thread YunQiang Su
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,

Bug#619684: Bug #619684: ns2: FTBFS on kfreebsd-*: emulate/net-pcap.cc:537:19: error: 'BIOCIMMEDIATE' was not declared in this scope

2011-04-15 Thread YunQiang Su
Or should pcap/bpf.h include net/bpf.h on BSD ? -- YunQiang Su -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Bug#619684: Bug #619684: ns2: FTBFS on kfreebsd-*: emulate/net-pcap.cc:537:19: error: 'BIOCIMMEDIATE' was not declared in this scope

2011-04-15 Thread Aron Xu
On Sat, Apr 16, 2011 at 03:49, YunQiang Su wzss...@gmail.com wrote: I got it. It used it like this #if !defined(__linux__)!defined(__APPLE__)        {                int immed = 1;                if (ioctl(pfd_, BIOCIMMEDIATE, immed) 0) {                        fprintf(stderr,