[squid-users] Can not compile ip_wccp.c

From: Mahmood Ahmed <braveheart@dont-contact.us>
Date: Fri, 27 Feb 2004 02:00:43 +0500

Hello All

This is the first time i am playing with kernel and trying to patch it
(ip_wccp.c) and failing. Having no idea what i am doing wrong i turn to the
number 1 place for squid help. below is the complete out put.

Regards
Mahmood Ahmed
Buraak Telecommunications Pvt. Ltd.

----------------------------

[root@dragon linux]# gcc -D__KERNEL__ -I/usr/include/linux -Wall
-Wstrict-prototypes\
> -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce \
> -mcpu=i386 -DCPU=386 -DMODULE -DMODVERSIONS -include \
> /usr/include/linux/modversions.h -c ip_wccp.c
In file included from <command line>:1:
/usr/include/linux/modversions.h:1:2: #error Modules should never use
kernel-headers system headers,
/usr/include/linux/modversions.h:2:2: #error but rather headers from an
appropriate kernel-source package.
/usr/include/linux/modversions.h:3:2: #error Change -I/usr/src/linux/include
(or similar) to
/usr/include/linux/modversions.h:4:2: #error -I/lib/modules/$(uname
-r)/build/include
/usr/include/linux/modversions.h:5:2: #error to build against the
currently-running kernel.
In file included from /usr/include/linux/fs.h:23,
                 from /usr/include/linux/capability.h:17,
                 from /usr/include/linux/binfmts.h:5,
                 from /usr/include/linux/sched.h:9,
                 from ip_wccp.c:10:
/usr/include/linux/string.h:8:2: warning: #warning Using kernel header in
userland!
In file included from /usr/include/linux/sched.h:14,
                 from ip_wccp.c:10:
/usr/include/linux/timex.h:173: field `time' has incomplete type
In file included from /usr/include/linux/bitops.h:69,
                 from /usr/include/asm/system.h:7,
                 from /usr/include/linux/sched.h:16,
                 from ip_wccp.c:10:
/usr/include/asm/bitops.h:327:2: warning: #warning This includefile is not
available on all architectures.
/usr/include/asm/bitops.h:328:2: warning: #warning Using kernel headers in
userspace: atomicity not guaranteed
In file included from /usr/include/linux/signal.h:4,
                 from /usr/include/linux/sched.h:25,
                 from ip_wccp.c:10:
/usr/include/asm/signal.h:107: parse error before "sigset_t"
/usr/include/asm/signal.h:110: parse error before '}' token
In file included from /usr/include/linux/sched.h:81,
                 from ip_wccp.c:10:
/usr/include/linux/timer.h:45: parse error before "spinlock_t"
/usr/include/linux/timer.h:53: parse error before '}' token
/usr/include/linux/timer.h:67: parse error before "tvec_base_t"
/usr/include/linux/timer.h:101: parse error before "tvec_bases"
/usr/include/linux/timer.h: In function `init_timer':
/usr/include/linux/timer.h:105: dereferencing pointer to incomplete type
/usr/include/linux/timer.h:105: dereferencing pointer to incomplete type
/usr/include/linux/timer.h:106: dereferencing pointer to incomplete type
/usr/include/linux/timer.h: In function `timer_pending':
/usr/include/linux/timer.h:121: dereferencing pointer to incomplete type
In file included from /usr/include/linux/highmem.h:5,
                 from /usr/include/linux/skbuff.h:26,
                 from ip_wccp.c:12:
/usr/include/asm/pgalloc.h:6:24: asm/fixmap.h: No such file or directory
In file included from /usr/include/linux/highmem.h:5,
                 from /usr/include/linux/skbuff.h:26,
                 from ip_wccp.c:12:
/usr/include/asm/pgalloc.h: At top level:
/usr/include/asm/pgalloc.h:57: parse error before '*' token
/usr/include/asm/pgalloc.h: In function `get_pgd_slow':
/usr/include/asm/pgalloc.h:59: `pgd_t' undeclared (first use in this function)
/usr/include/asm/pgalloc.h:59: (Each undeclared identifier is reported only once
/usr/include/asm/pgalloc.h:59: for each function it appears in.)
/usr/include/asm/pgalloc.h:59: `pgd' undeclared (first use in this function)
/usr/include/asm/pgalloc.h:59: parse error before ')' token
/usr/include/asm/pgalloc.h:62: `USER_PTRS_PER_PGD' undeclared (first use in
this function)
/usr/include/asm/pgalloc.h:63: `swapper_pg_dir' undeclared (first use in this
function)
/usr/include/asm/pgalloc.h:63: `PTRS_PER_PGD' undeclared (first use in this
function)
/usr/include/asm/pgalloc.h: At top level:
/usr/include/asm/pgalloc.h:70: parse error before '*' token
/usr/include/asm/pgalloc.h: In function `get_pgd_fast':
/usr/include/asm/pgalloc.h:80: `pgd_t' undeclared (first use in this function)
/usr/include/asm/pgalloc.h:80: parse error before ')' token
/usr/include/asm/pgalloc.h: At top level:
/usr/include/asm/pgalloc.h:83: parse error before '*' token
/usr/include/asm/pgalloc.h: In function `free_pgd_fast':
/usr/include/asm/pgalloc.h:85: `pgd' undeclared (first use in this function)
/usr/include/asm/pgalloc.h: At top level:
/usr/include/asm/pgalloc.h:90: parse error before '*' token
/usr/include/asm/pgalloc.h: In function `free_pgd_slow':
/usr/include/asm/pgalloc.h:99: `pgd' undeclared (first use in this function)
/usr/include/asm/pgalloc.h: At top level:
/usr/include/asm/pgalloc.h:103: parse error before '*' token
/usr/include/asm/pgalloc.h: In function `pte_alloc_one':
/usr/include/asm/pgalloc.h:105: `pte_t' undeclared (first use in this function)
/usr/include/asm/pgalloc.h:105: `pte' undeclared (first use in this function)
/usr/include/asm/pgalloc.h:109: parse error before ')' token
/usr/include/asm/pgalloc.h: At top level:
/usr/include/asm/pgalloc.h:118: parse error before '*' token
/usr/include/asm/pgalloc.h: In function `pte_alloc_one_fast':
/usr/include/asm/pgalloc.h:127: `pte_t' undeclared (first use in this function)
/usr/include/asm/pgalloc.h:127: parse error before ')' token
/usr/include/asm/pgalloc.h: At top level:
/usr/include/asm/pgalloc.h:130: parse error before '*' token
/usr/include/asm/pgalloc.h: In function `pte_free_fast':
/usr/include/asm/pgalloc.h:132: `pte' undeclared (first use in this function)
/usr/include/asm/pgalloc.h: At top level:
/usr/include/asm/pgalloc.h:137: parse error before '*' token
/usr/include/asm/pgalloc.h: In function `pte_free_slow':
/usr/include/asm/pgalloc.h:139: `pte' undeclared (first use in this function)
/usr/include/asm/pgalloc.h: In function `flush_tlb_mm':
/usr/include/asm/pgalloc.h:183: `current' undeclared (first use in this function)
/usr/include/asm/pgalloc.h: In function `flush_tlb_page':
/usr/include/asm/pgalloc.h:190: dereferencing pointer to incomplete type
/usr/include/asm/pgalloc.h:190: `current' undeclared (first use in this function)
/usr/include/asm/pgalloc.h: In function `flush_tlb_range':
/usr/include/asm/pgalloc.h:197: `current' undeclared (first use in this function)
In file included from ip_wccp.c:12:
/usr/include/linux/skbuff.h: At top level:
/usr/include/linux/skbuff.h:100: parse error before "spinlock_t"
/usr/include/linux/skbuff.h:120: parse error before "atomic_t"
/usr/include/linux/skbuff.h:124: parse error before '}' token
/usr/include/linux/skbuff.h:183: parse error before "atomic_t"
/usr/include/linux/skbuff.h:215: parse error before '}' token
ip_wccp.c:19:20: net/ip.h: No such file or directory
ip_wccp.c: In function `ip_wccp_rcv':
ip_wccp.c:35: dereferencing pointer to incomplete type
ip_wccp.c:40: dereferencing pointer to incomplete type
ip_wccp.c:40: dereferencing pointer to incomplete type
ip_wccp.c:44: dereferencing pointer to incomplete type
ip_wccp.c:45: dereferencing pointer to incomplete type
ip_wccp.c:45: warning: implicit declaration of function `skb_pull'
ip_wccp.c:45: dereferencing pointer to incomplete type
ip_wccp.c:45: dereferencing pointer to incomplete type
ip_wccp.c:47: dereferencing pointer to incomplete type
ip_wccp.c:47: dereferencing pointer to incomplete type
ip_wccp.c:47: dereferencing pointer to incomplete type
ip_wccp.c:50: dereferencing pointer to incomplete type
ip_wccp.c:53: warning: implicit declaration of function `IPCB'
ip_wccp.c:53: invalid type argument of `->'
ip_wccp.c:53: sizeof applied to an incomplete type
ip_wccp.c:54: dereferencing pointer to incomplete type
ip_wccp.c:55: dereferencing pointer to incomplete type
ip_wccp.c:56: dereferencing pointer to incomplete type
ip_wccp.c:57: warning: implicit declaration of function `dst_release'
ip_wccp.c:57: dereferencing pointer to incomplete type
ip_wccp.c:58: dereferencing pointer to incomplete type
ip_wccp.c:60: warning: implicit declaration of function `ip_rcv'
ip_wccp.c:60: dereferencing pointer to incomplete type
ip_wccp.c:63: warning: implicit declaration of function `kfree_skb'
ip_wccp.c: At top level:
ip_wccp.c:67: variable `ipgre_protocol' has initializer but incomplete type
ip_wccp.c:68: warning: excess elements in struct initializer
ip_wccp.c:68: warning: (near initialization for `ipgre_protocol')
ip_wccp.c:69: warning: excess elements in struct initializer
ip_wccp.c:69: warning: (near initialization for `ipgre_protocol')
ip_wccp.c:70: warning: excess elements in struct initializer
ip_wccp.c:70: warning: (near initialization for `ipgre_protocol')
ip_wccp.c:71: warning: excess elements in struct initializer
ip_wccp.c:71: warning: (near initialization for `ipgre_protocol')
ip_wccp.c:72: warning: excess elements in struct initializer
ip_wccp.c:72: warning: (near initialization for `ipgre_protocol')
ip_wccp.c:73: warning: excess elements in struct initializer
ip_wccp.c:73: warning: (near initialization for `ipgre_protocol')
ip_wccp.c:75: warning: excess elements in struct initializer
ip_wccp.c:75: warning: (near initialization for `ipgre_protocol')
ip_wccp.c: In function `init_module':
ip_wccp.c:79: warning: implicit declaration of function `printk'
ip_wccp.c:79: `KERN_INFO' undeclared (first use in this function)
ip_wccp.c:79: parse error before string constant
ip_wccp.c:80: warning: implicit declaration of function `inet_add_protocol'
ip_wccp.c: In function `cleanup_module':
ip_wccp.c:86: warning: implicit declaration of function `inet_del_protocol'
ip_wccp.c:87: `KERN_INFO' undeclared (first use in this function)
ip_wccp.c:87: parse error before string constant
ip_wccp.c: At top level:
ip_wccp.c:67: storage size of `ipgre_protocol' isn't known
[root@dragon linux]#

---------------------------------------------------------
This mail has been sent using Buraak Net's Mailing System
(http://www.buraak.net.pk)
Received on Thu Feb 26 2004 - 14:06:50 MST

This archive was generated by hypermail pre-2.1.9 : Mon Mar 01 2004 - 12:00:03 MST