lkml.org 
[lkml]   [1996]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 1.3.96 doesnt compile with firewall support (FIX)
Snow Cat wrote:
>
> Hi,
>
> I get a page of errors when compiling 1.3.96's firewall.c. I think either
> firewall.c or skbuff.h should include <linux/types.h> for the definition
> of __u32 used in the header file.

I get this too. The error complains first about a parse error in line #39
if include/linux/skbuff.h, before "__u32". Then it goes on to complain
in just about every sk_ function that a pointer to an incomplete structure
is being dereferenced. Here's some output:

gcc -D__KERNEL__ -I/usr2/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
-fno-strength-reduce -pipe -m486 -DCPU=486 -c -o sock.o sock.c
In file included from firewall.c:10:
/usr2/src/linux/include/linux/skbuff.h:39: parse error before `__u32'
/usr2/src/linux/include/linux/skbuff.h:39: warning: no semicolon at end of struct or union
/usr2/src/linux/include/linux/skbuff.h:81: parse error before `__u32'
/usr2/src/linux/include/linux/skbuff.h:81: warning: no semicolon at end of struct or union
/usr2/src/linux/include/linux/skbuff.h:82: warning: data definition has no type or storage class
/usr2/src/linux/include/linux/skbuff.h:83: parse error before `raddr'
/usr2/src/linux/include/linux/skbuff.h:83: warning: data definition has no type or storage class
/usr2/src/linux/include/linux/skbuff.h:84: parse error before `seq'

... and later ...

/usr2/src/linux/include/linux/skbuff.h: In function `skb_peek':
/usr2/src/linux/include/linux/skbuff.h:180: dereferencing pointer to incomplete type

... and so on.



FIX: I inserted an include of linux/types.h so __u32 is defined, and it compiles:

diff -u include/linux/skbuff.h.bad include/linux/skbuff.h
--- include/linux/skbuff.h.bad Mon Apr 29 13:12:21 1996
+++ include/linux/skbuff.h Mon Apr 29 13:11:53 1996
@@ -14,6 +14,7 @@
#ifndef _LINUX_SKBUFF_H
#define _LINUX_SKBUFF_H

+#include <linux/types.h>
#include <linux/config.h>
#include <linux/time.h>

--
Andrew C. Esh mailto:andrew_esh@cnt.com
Computer Network Technology andrewes@mtn.org (finger for PGP key)
6500 Wedgwood Road 612.550.8000 (main)
Maple Grove MN 55311 612.550.8229 (direct)
http://www.cnt.com - CNT Inc. Home Page
http://www.mtn.org/~andrewes - ACE Home Page

\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.038 / U:30.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site