Date: Thu, 18 Oct 2001 07:53:42 -0700 (PDT) From: KUROSAWA Takahiro <fwkg7679@mb.infoweb.ne.jp> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/31356: "typedef" seems dropped around pfil_head_t in sys/net/pfil.h (maybe typo). Message-ID: <200110181453.f9IErgN15492@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 31356 >Category: kern >Synopsis: "typedef" seems dropped around pfil_head_t in sys/net/pfil.h (maybe typo). >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Oct 18 08:00:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: KUROSAWA Takahiro >Release: 5.0-CURRENT >Organization: >Environment: FreeBSD amdk6 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Thu Oct 18 19:36:13 JST 2001 kurosawa@amdk6:/home/kurosawa/compile/em6/sys/i386/compile/AMDK7EM6 i386 >Description: pfil_head_t seems to be a typedef'd type according to its name, but is actually declared as a variable in sys/net/pfil.h. "typedef" seems dropped before "struct": (from sys/net/pfil.h) struct pfil_head { pfil_list_t ph_in; pfil_list_t ph_out; int ph_init; } pfil_head_t; >How-To-Repeat: Compile and link these two files (a.c and b.c) with c++ compiler: c++ a.c b.c This results in: /tmp/cc5njlvK.o(.data+0x0): multiple definition of `pfil_head_t' /tmp/ccaxafCz.o(.data+0x0): first defined here a.c: #include <sys/types.h> #include <net/pfil.h> int main(void) { return 0; } b.c: #include <sys/types.h> #include <net/pfil.h> >Fix: Append "typedef" before "struct" at line 57 in sys/net/pfil.h (rev. 1.6). >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110181453.f9IErgN15492>