| Summary: | "typedef" seems dropped around pfil_head_t in sys/net/pfil.h (maybe typo). | ||
|---|---|---|---|
| Product: | Base System | Reporter: | fwkg7679 <fwkg7679> |
| Component: | kern | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 5.0-CURRENT | ||
| Hardware: | Any | ||
| OS: | Any | ||
State Changed From-To: open->closed Fixed by removing "pfil_head_t" completely. |
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; Fix: Append "typedef" before "struct" at line 57 in sys/net/pfil.h (rev. 1.6). 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>