> ----- Message from [EMAIL PROTECTED] --------- > Date: Sat, 31 Dec 2005 20:55:38 +0800 > From: prime <[EMAIL PROTECTED]> > Reply-To: prime <[EMAIL PROTECTED]> > Subject: Re: Problem about libnet on FreeBSD 6.0 > To: Gilbert Fernandes <[EMAIL PROTECTED]> > > On 12/31/05, Gilbert Fernandes <[EMAIL PROTECTED]> wrote: > > > > > I find that I can't include <net/ethernet.h> when I programming > > > with libnet,because $(CC) complains that "struct ether_addr > redefined". > > > But I need some definitions in <net/ethernet.h>,struct ether_header > etc. > > > Currently,I just copy the definitions I need from > <net/ethernet.h>,but > > > it seems very ugly.Any one has some good ideas? > > > > Could you show us the include line you use ? > > > > #include "blabla" and > > #include <blabla> > > > > will produce very different results as you know :) > > > > You do use #include <net/ethernet.h> ? > > > > -- > > unzip ; strip ; touch ; grep ; finger ; mount ; fsck ; more ; yes ; > > fsck ; umount ; sleep > > > Here is my include lines, > #include ...... > #include <net/ethernet.h> > #include <pcap.h> > #include <libnet.h> > ........... > and this is the error, > $(CC) said "/usr/local/include/./libnet/libnet-headers.h:393: error: > redefinition of `struct ether_addr'" > > > Thanks. > -- > Three passions, simple but overwhelmingly strong, have governed my life: > the longing for love, the search for knowledge, and unbearable pity for > the suffering of mankind. > ---------Bertrand Russell > > > ----- End message from [EMAIL PROTECTED] -----
Redefinition means that you have two declarations of the same function. One of the files you are including IS already including net/ethernet probably. Can you check ? :) -- unzip ; strip ; touch ; grep ; finger ; mount ; fsck ; more ; yes ; fsck ; umount ; sleep _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"