#40 Order of includes in pcap-snoop.c

open
Eric Rescorla
build (26)
5
2006-12-27
2006-12-27
Pascal Pochet
No

On Darwin/Mac OS X the line
#include <net/bpf.h>
should be BEFORE the
#include <pcap.h>
line in order to avoid these errors

In file included from ./base/pcap-snoop.c:52:
/usr/include/net/bpf.h:93: error: redefinition of 'struct bpf_program'
/usr/include/net/bpf.h:118: error: redefinition of 'struct bpf_version'
/usr/include/net/bpf.h:321: error: redefinition of 'struct bpf_insn'

Discussion