From owner-freebsd-bugs Thu Oct 18 8: 0: 8 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id BD1FF37B40B for ; Thu, 18 Oct 2001 08:00:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f9IF01A16216; Thu, 18 Oct 2001 08:00:01 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 710DC37B407 for ; Thu, 18 Oct 2001 07:53:42 -0700 (PDT) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f9IErgN15492; Thu, 18 Oct 2001 07:53:42 -0700 (PDT) (envelope-from nobody) Message-Id: <200110181453.f9IErgN15492@freefall.freebsd.org> Date: Thu, 18 Oct 2001 07:53:42 -0700 (PDT) From: KUROSAWA Takahiro To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/31356: "typedef" seems dropped around pfil_head_t in sys/net/pfil.h (maybe typo). Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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 #include int main(void) { return 0; } b.c: #include #include >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