[patch] Re: 2.2.14pre13 won't compile

Johan Kullstam (kullstam@ne.mediaone.net)
14 Dec 1999 08:59:52 -0500


solar <tlyi@126.com> writes:

> make[3]: Entering directory `/usr/src/linux-2.2.14pre13/net/ipv4'
> gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2
> -fomit-frame-pointer -fno-strict-aliasing -D__SMP__ -pipe
> -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2
> -malign-functions=2 -DCPU=686 -DEXPORT_SYMTAB -c ip_masq.c
> ip_masq.c: In function `masq_expire':
> ip_masq.c:845: `sysctl_ip_always_defrag' undeclared (first use in this
> function)
> ip_masq.c:845: (Each undeclared identifier is reported only once
> ip_masq.c:845: for each function it appears in.)
> ip_masq.c: At top level:
> ip_masq.c:887: `sysctl_ip_always_defrag' used prior to declaration
> make[3]: *** [ip_masq.o] Error 1
> make[3]: Leaving directory `/usr/src/linux-2.2.14pre13/net/ipv4'
> make[2]: *** [first_rule] Error 2
> make[2]: Leaving directory `/usr/src/linux-2.2.14pre13/net/ipv4'
> make[1]: *** [_subdir_ipv4] Error 2
> make[1]: Leaving directory `/usr/src/linux-2.2.14pre13/net'
> make: *** [_dir_net] Error 2

i encountered this too. simply move the declaration. hope this helps.

----- diff -u ip_masq.c~ ip_masq.c --------
--- ip_masq.c~ Tue Dec 14 07:53:17 1999
+++ ip_masq.c Tue Dec 14 08:52:23 1999
@@ -280,6 +280,12 @@
extern int sysctl_ip_dynaddr;

/*
+ * Defragment flag
+ */
+
+extern int sysctl_ip_always_defrag;
+
+/*
* Lookup lock
*/
rwlock_t __ip_masq_lock = RW_LOCK_UNLOCKED;
@@ -883,8 +889,6 @@
*
* Be careful, it can be called from u-space
*/
-
-extern int sysctl_ip_always_defrag;

struct ip_masq * ip_masq_new(int proto, __u32 maddr, __u16 mport, __u32 saddr, __u16 sport, __u32 daddr, __u16 dport, unsigned mflags)
{
-----------------------------------

-- 
J o h a n  K u l l s t a m
[kullstam@ne.mediaone.net]
Don't Fear the Penguin!

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/