From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 31 15:25:58 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5304516A41F for ; Sat, 31 Dec 2005 15:25:58 +0000 (GMT) (envelope-from edelkind-freebsd-hackers@episec.com) Received: from episec.com (episec.com [69.55.237.141]) by mx1.FreeBSD.org (Postfix) with SMTP id EB4CF43D4C for ; Sat, 31 Dec 2005 15:25:57 +0000 (GMT) (envelope-from edelkind-freebsd-hackers@episec.com) Received: (qmail 48252 invoked by uid 1024); 31 Dec 2005 15:25:57 -0000 Date: Sat, 31 Dec 2005 10:25:57 -0500 From: ari edelkind To: freebsd-hackers@freebsd.org Message-ID: <20051231152557.GE15481@episec.com> Mail-Followup-To: ari edelkind , freebsd-hackers@freebsd.org References: <1fa17f810512301341w5b98d554g6dcf950ab26f31bd@mail.gmail.com> <20051231133853.pyq2hfoow4sgcsw8@webmail.spamcop.net> <1fa17f810512310455l3146b840w12a1a53361029608@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1fa17f810512310455l3146b840w12a1a53361029608@mail.gmail.com> Subject: Re: Problem about libnet on FreeBSD 6.0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2005 15:25:58 -0000 guomingyan@gmail.com wrote: > On 12/31/05, Gilbert Fernandes wrote: > > > > > I find that I can't include when I programming > > > with libnet,because $(CC) complains that "struct ether_addr redefined". > > > But I need some definitions in ,struct ether_header etc. > > > Currently,I just copy the definitions I need from ,but > > > it seems very ugly.Any one has some good ideas? > > > Here is my include lines, > #include ...... > #include > #include > #include > ........... > and this is the error, > $(CC) said "/usr/local/include/./libnet/libnet-headers.h:393: error: > redefinition of `struct ether_addr'" > Assuming that either the practical contents of 'struct ether_addr' are the same for both definitions or that it doesn't matter for any inline functions you may be using within the header file (chances are, this assumption is valid): #include #include #define ether_addr ether_addr_BROKEN_LIBNET # include #undef ether_addr .... ari