# bewan-adsl compiling problems

## ironfistx

Hi im having trouble compiling some atm drivers for a pci adsl model card. See below for the error i get. Not sure why its complaining that skb_unlink has too few arguments, according to the header file unicorn_atmdrv.c is calling the skb_unlink function correctly. Im using the gentoo 2.6.14 kernel and ive tried both the stable 0.8.7 and unstable 0.9.0 versions of the package. Any help would be appreciated

```

make CC=gcc -C /usr/src/linux SUBDIRS=/var/tmp/portage/unicorn/unicorn_pci modules

make[1]: Entering directory `/usr/src/linux-2.6.14-gentoo-r2'

CC [M] /var/tmp/portage/unicorn/unicorn_pci/unicorn_pcidrv.o

In file included from /var/tmp/portage/unicorn/unicorn_pci/unicorn_pcidrv.c:25:

/var/tmp/portage/unicorn/amu/amas.h:373:5: warning: "WIN32" is not defined

/var/tmp/portage/unicorn/amu/amas.h:389:5: warning: "WIN32" is not defined

/var/tmp/portage/unicorn/unicorn_pci/unicorn_pcidrv.c:57:5: warning: "BIG_ENDIAN" is not defined

/var/tmp/portage/unicorn/unicorn_pci/unicorn_pcidrv.c:1781:5: warning: "NOT_USED" is not defined

CC [M] /var/tmp/portage/unicorn/unicorn_pci/../msw/linrapi.o

In file included from /var/tmp/portage/unicorn/msw/linrapi.c:28:

/var/tmp/portage/unicorn/amu/amas.h:373:5: warning: "WIN32" is not defined

/var/tmp/portage/unicorn/amu/amas.h:389:5: warning: "WIN32" is not defined

/var/tmp/portage/unicorn/msw/linrapi.c:278:5: warning: "USE_HW_TIMER" is not defined

g++ -fno-rtti -fno-exceptions -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -pipe -msoft-float -mpreferred-stack-boundary=2 -march=athlon -Iinclude/asm-i386/mach-default -DVERS=0 -D_PCI_DRIVER -DDEBUG=1 -I/var/tmp/portage/unicorn/unicorn_pci/../include -I/var/tmp/portage/unicorn/unicorn_pci/../ -D__KERNEL__ -Iinclude -c -o /var/tmp/portage/unicorn/unicorn_pci/../msw/msw.o /var/tmp/portage/unicorn/unicorn_pci/../msw/msw.cpp

cc1plus: warning: "-ffreestanding" is valid for C/ObjC but not for C++

In file included from /var/tmp/portage/unicorn/msw/msw.cpp:15:

/var/tmp/portage/unicorn/amu/amas.h:373:5: warning: "WIN32" is not defined

/var/tmp/portage/unicorn/amu/amas.h:389:5: warning: "WIN32" is not defined

CC [M] /var/tmp/portage/unicorn/unicorn_pci/../msw/crc.o

g++ -fno-rtti -fno-exceptions -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -pipe -msoft-float -mpreferred-stack-boundary=2 -march=athlon -Iinclude/asm-i386/mach-default -DVERS=0 -D_PCI_DRIVER -DDEBUG=1 -I/var/tmp/portage/unicorn/unicorn_pci/../include -I/var/tmp/portage/unicorn/unicorn_pci/../ -D__KERNEL__ -Iinclude -c -o /var/tmp/portage/unicorn/unicorn_pci/../amu/amas.o /var/tmp/portage/unicorn/unicorn_pci/../amu/amas.cpp

cc1plus: warning: "-ffreestanding" is valid for C/ObjC but not for C++

In file included from /var/tmp/portage/unicorn/amu/amas.cpp:3:

/var/tmp/portage/unicorn/amu/amas.h:373:5: warning: "WIN32" is not defined

/var/tmp/portage/unicorn/amu/amas.h:389:5: warning: "WIN32" is not defined

g++ -fno-rtti -fno-exceptions -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -pipe -msoft-float -mpreferred-stack-boundary=2 -march=athlon -Iinclude/asm-i386/mach-default -DVERS=0 -D_PCI_DRIVER -DDEBUG=1 -I/var/tmp/portage/unicorn/unicorn_pci/../include -I/var/tmp/portage/unicorn/unicorn_pci/../ -D__KERNEL__ -Iinclude -c -o /var/tmp/portage/unicorn/unicorn_pci/../amu/amu.o /var/tmp/portage/unicorn/unicorn_pci/../amu/amu.cpp

cc1plus: warning: "-ffreestanding" is valid for C/ObjC but not for C++

In file included from /var/tmp/portage/unicorn/amu/amu.cpp:6:

/var/tmp/portage/unicorn/amu/amas.h:373:5: warning: "WIN32" is not defined

/var/tmp/portage/unicorn/amu/amas.h:389:5: warning: "WIN32" is not defined

g++ -fno-rtti -fno-exceptions -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -pipe -msoft-float -mpreferred-stack-boundary=2 -march=athlon -Iinclude/asm-i386/mach-default -DVERS=0 -D_PCI_DRIVER -DDEBUG=1 -I/var/tmp/portage/unicorn/unicorn_pci/../include -I/var/tmp/portage/unicorn/unicorn_pci/../ -D__KERNEL__ -Iinclude -c -o /var/tmp/portage/unicorn/unicorn_pci/../amu/bsp_pci.o /var/tmp/portage/unicorn/unicorn_pci/../amu/bsp_pci.cpp

cc1plus: warning: "-ffreestanding" is valid for C/ObjC but not for C++

CC [M] /var/tmp/portage/unicorn/unicorn_pci/../unicorn_atm/unicorn_atmdrv.o

In file included from /var/tmp/portage/unicorn/unicorn_atm/unicorn_atmdrv.c:25:

/var/tmp/portage/unicorn/amu/amas.h:373:5: warning: "WIN32" is not defined

/var/tmp/portage/unicorn/amu/amas.h:389:5: warning: "WIN32" is not defined

/var/tmp/portage/unicorn/unicorn_atm/unicorn_atmdrv.c: In function `snd_poll':

/var/tmp/portage/unicorn/unicorn_atm/unicorn_atmdrv.c:507: error: too few arguments to function `skb_unlink'

make[2]: *** [/var/tmp/portage/unicorn/unicorn_pci/../unicorn_atm/unicorn_atmdrv.o] Error 1

make[1]: *** [_module_/var/tmp/portage/unicorn/unicorn_pci] Error 2

make[1]: Leaving directory `/usr/src/linux-2.6.14-gentoo-r2'

make: *** [modules] Error 2

```

----------

## SuperMegaMau

hi,

I get the exact same problem you describe, so I took a look at the source of the driver and made some changes. Aparently, the function "skb_unlink" needs two arguments instead of just one. This only occours on Kernel versions above 2.6.13 I think. You can correct the problem by getting the drivers sources version 0.9.2 at the time. Then you have to make some changes:

edit file "unicorn_atm/unicorn_atmdrv.c" search for "static void snd_poll(struct unicorn_atmdrv *drv)" then add this line just after the "{": 

```
struct sk_buff_head *q = &drv->tx_q;
```

Then, search for the "skb_unlink" keyword and change 

```
skb_unlink(skb);
```

 for 

```
skb_unlink(skb,q);
```

Do the exact same thing to the "unicorn_eth/unicorn_ethdrv.c" file. After this you should be able to compile the driver without problems...

----------

## www.rzr.online.fr

 *ironfistx wrote:*   

> Hi im having trouble compiling some atm drivers for a pci adsl model card. 

 

Does anyone here still use unicorn driver with bewan usb grey modem ? 

@ http://rzr.online.fr/q/unicorn

----------

