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