[2.1.79] shaper compilation error

Scott Lampert (fortunato@heavymetal.org)
Tue, 13 Jan 1998 18:02:36 -0500 (EST)


I get the following error trying to compile shaper as a module in the
2.1.79 kernel:

gcc -D__KERNEL__ -I/usr/src/linux-2.1.79/include -Wall -Wstrict-prototypes
-O2 -fomit-frame-pointer -pipe -fno-strength-reduce -m486 -malign-loops=2
-malign-jumps=2 -malign-functions=2 -DCPU=586 -DMODULE -c -o shaper.o
shaper.c
shaper.c: In function `shaper_queue_xmit':
shaper.c:257: structure has no member named `arp'
shaper.c: In function `shaper_cache':
shaper.c:460: warning: passing arg 1 from incompatible pointer type
shaper.c:460: warning: passing arg 2 from incompatible pointer type
shaper.c:460: too many arguments to function
shaper.c: In function `shaper_probe':
shaper.c:591: warning: assignment from incompatible pointer type
make[2]: *** [shaper.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.1.79/drivers/net'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/linux-2.1.79/drivers'
make: *** [modules] Error 2

I don't know if this is the correct way to do this, but I came up
with the following patch that at least gets it to compile (I haven't
actually tried to use it yet). It looks like the arp field in the sk_buff
structure has been removed in 2.1.79. I'm not sure if this is supposed to
be this way, or it was an oversight so I just took out the assignment. And
in hard_header_cache as defined in if_shaper.h there appears to be no
argument to take the passed in dst. This is out of my league so caveat
emptor and all that. ;)

--- linux/drivers/net/shaper.c.orig Tue Jan 13 17:49:15 1998
+++ linux/drivers/net/shaper.c Tue Jan 13 18:00:00 1998
@@ -254,7 +254,6 @@
if(newskb)
{
newskb->dev=shaper->dev;
- newskb->arp=1;
newskb->priority=2;
if(sh_debug)
printk("Kick new frame to %s, %d\n",
@@ -457,7 +456,7 @@
printk("Shaper header cache bind\n");
tmp=dst->dev;
dst->dev=sh->dev;
- ret=sh->hard_header_cache(dst,neigh,hh);
+ ret=sh->hard_header_cache(neigh,hh);
dst->dev=tmp;
return ret;
}

---
Scott Lampert             | Home Page: http://www.heavymetal.org
fortunato@heavymetal.org  | PGP Key: finger fortunato@heavymetal.org
"Sing the Hare Hare,      |_________________________________________
   Dance the Hoochie Koo"