David Brownlee
2012-03-14 18:53:59 UTC
I'm trying to build the latest mongodb (C++ app) on NetBSD-6, and it
fails with the following error:
In file included from tools/sniffer.cpp:30:0:
/usr/include/pcap/bpf.h:382:8: error: previous declaration of 'u_int
bpf_filter(const bpf_insn*, const u_char*, u_int, u_int)' with 'C++'
linkage
/usr/include/pcap.h:354:71: error: conflicts with new declaration with
'C' linkage
/usr/include/pcap/bpf.h:381:6: error: previous declaration of 'int
bpf_validate(const bpf_insn*, int)' with 'C++' linkage
/usr/include/pcap.h:355:51: error: conflicts with new declaration with
'C' linkage
This seems to be because both /usr/include/pcap.h and
/usr/include/pcap/bpf.h declare:
int bpf_validate(const struct bpf_insn *, int);
u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int);
Since /usr/include/pcap.h includes /usr/include/pcap/bpf.h (#ifndef
PCAP_DONT_INCLUDE_PCAP_BPF_H)
is this really necessary, or even desirable?
Needless to say commenting out the duplicate declarations allows a
build to complete...
Is this a fault with NetBSD's includes?
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
fails with the following error:
In file included from tools/sniffer.cpp:30:0:
/usr/include/pcap/bpf.h:382:8: error: previous declaration of 'u_int
bpf_filter(const bpf_insn*, const u_char*, u_int, u_int)' with 'C++'
linkage
/usr/include/pcap.h:354:71: error: conflicts with new declaration with
'C' linkage
/usr/include/pcap/bpf.h:381:6: error: previous declaration of 'int
bpf_validate(const bpf_insn*, int)' with 'C++' linkage
/usr/include/pcap.h:355:51: error: conflicts with new declaration with
'C' linkage
This seems to be because both /usr/include/pcap.h and
/usr/include/pcap/bpf.h declare:
int bpf_validate(const struct bpf_insn *, int);
u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int);
Since /usr/include/pcap.h includes /usr/include/pcap/bpf.h (#ifndef
PCAP_DONT_INCLUDE_PCAP_BPF_H)
is this really necessary, or even desirable?
Needless to say commenting out the duplicate declarations allows a
build to complete...
Is this a fault with NetBSD's includes?
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de