# Zaptel and Kernel 2.6.16 doesn't compile

## ogawoga

Just wanted to say that zaptel has also a problem with the changed kernel api in 2.6.16. I'm not very good in c/c++, can somebody fix this Problem?

```
  CC [M]  /var/tmp/portage/zaptel-1.0.8/work/zaptel-1.0.8/tor2.o

  CC [M]  /var/tmp/portage/zaptel-1.0.8/work/zaptel-1.0.8/torisa.o

/var/tmp/portage/zaptel-1.0.8/work/zaptel-1.0.8/torisa.c:1141: warning: 'set_tor_base' defined but not used

  CC [M]  /var/tmp/portage/zaptel-1.0.8/work/zaptel-1.0.8/wcusb.o

/var/tmp/portage/zaptel-1.0.8/work/zaptel-1.0.8/wcusb.c:1451: error: unknown field `owner' specified in initializer

/var/tmp/portage/zaptel-1.0.8/work/zaptel-1.0.8/wcusb.c:1451: warning: initialization from incompatible pointer type

make[2]: *** [/var/tmp/portage/zaptel-1.0.8/work/zaptel-1.0.8/wcusb.o] Error 1

make[1]: *** [_module_/var/tmp/portage/zaptel-1.0.8/work/zaptel-1.0.8] Error 2

make[1]: Leaving directory `/usr/src/linux-2.6.16-gentoo-r3'

make: *** [linux26] Error 2

!!! ERROR: net-misc/zaptel-1.0.8 failed.

!!! Function src_compile, Line 119, Exitcode 2

!!! (no error message)

!!! If you need support, post the topmost build error, NOT this status message.

```

Greetings Oga

----------

## ogawoga

seem to work if /var/tmp/portage/zaptel-1.0.8/work/zaptel-1.0.8/wcusb.c:1451 is commented out. But of course this is not a good solution. Would be nice to fix this issue in one of the next releases.

Oga

----------

## damacles

Does anyone have an answer to this ?

I tried commenting out that line but when you emerge it just replaces it

Is there a proper fix out there ?

----------

## fblain

Since the 2.6.16 kernel, the structure usb_driver defined in ~linux/include/linux/usb.h has lost a field called "owner".

However the zaptel current version ( 1.0.8 ) is not up to date regarding this change.

From zaptel-1.0.8/wcusb.c :

```

static struct usb_driver wc_usb_driver =

{

#ifdef LINUX26

   owner: THIS_MODULE,

#else   

   fops: NULL,

   minor: 0,

#endif   

   name: "wcusb",

   probe: wc_usb_probe,

   disconnect: wc_usb_disconnect,

   id_table: wc_dev_ids,

};

```

So if you are using a 2.6.16 kernel or above, zaptel will fail to compile.

This issue has been resolved  in the zaptel 1.2 branch.

A workaround is to apply this patch :

```

==============================================================================

--- branches/1.2/wcusb.c (original)

+++ branches/1.2/wcusb.c Wed Jan 18 22:40:26 2006

@@ -1448,7 +1448,9 @@

 static struct usb_driver wc_usb_driver =

 {

 #ifdef LINUX26

+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)

    owner: THIS_MODULE,

+#endif

 #else   

    fops: NULL,

    minor: 0,

```

or emerge a (masked) 1.2.* zaptel version.Last edited by fblain on Mon Jun 12, 2006 7:32 am; edited 2 times in total

----------

## damacles

Hi fblain

Thanks for that

But one question how do I emerge zaptel-1.2.6 as I cannot find it anywhere !

I found reference to it at http://packages.gentoo.org/packages/?category=net-misc;name=zaptel

but I cannot get it when I emerge zaptel-1.2.6

localhost ~ # emerge zaptel-1.2.6          

Calculating dependencies   

!!! 'zaptel-1.2.6' is not a valid package atom.

!!! Please check ebuild(5) for full details.

!!! (Did you specify a version but forget to prefix with '='?)

localhost ~ #

Read ebuild(5) but could not work it out

Dam

----------

## fblain

There is no ebuild for zaptel-1.2.6 for the moment.

Latest one is for 1.2.5

To emerge zaptel 1.2.5 : 

```

echo "=net-misc/zaptel-1.2.5" >> /etc/portage/package.keywords

emerge net-misc/zaptel

```

However, I don't know why this package is masked.

If you are experiencing any problems, you should apply the patch.

To do this, after a failed emerge, go in /var/tmp/portage/zaptel-1.0.8/work/zaptel-1.0.8

and apply the patch on the file wcusb.c.

Then finish to merge the packet :

```

ebuild /usr/portage/net-misc/zaptel/zaptel-1.0.8.ebuild compile install qmerge

```

----------

## damacles

Hi Fblain

I emerged 1.2.5 on my remote "test" system

That seemed to work fine

I will give it a try tomorrow

Thanks for the help

Dam

----------

## jhunholz

I just had this same problem, but by upgrading to the zaptel-1.0.10 package, it seems to be working now.

----------

