# kernel mm-sources 2.6.9 ndiswrapper error

## feint

```
/root/ndiswrapper-0.11/driver/wrapper.c: In function `ndis_suspend_pci':

/root/ndiswrapper-0.11/driver/wrapper.c:930: error: too many arguments to function `pci_save_state'

/root/ndiswrapper-0.11/driver/wrapper.c: In function `ndis_resume_pci':

/root/ndiswrapper-0.11/driver/wrapper.c:957: error: too many arguments to function `pci_restore_state'

/root/ndiswrapper-0.11/driver/wrapper.c: In function `ndis_init_one_pci':

/root/ndiswrapper-0.11/driver/wrapper.c:1525: error: too many arguments to function`pci_restore_state'

make[3]: *** [/root/ndiswrapper-0.11/driver/wrapper.o] Error 1

make[2]: *** [_module_/root/ndiswrapper-0.11/driver] Error 2

make[2]: Leaving directory `/usr/src/linux-2.6.9-mm1'

make[1]: *** [default] Error 2

make[1]: Leaving directory `/root/ndiswrapper-0.11/driver'

make: *** [all] Error 2

```

It looks like wrapper.c is trying to pass 2 arguments to function pci_restore_state in i think pci.h in the include for the kernel source. How is this fixed or do I need to wait for the people of ndiswrapper to fix it?

----------

## DarwinianCoeus

not mm specific, new to 2.6.9 though

----------

## feint

not much help. i tried deleting the extra arguments being sent to that function, this allows it to be compiled but then the drivers won't create the device.

----------

## DarwinianCoeus

probably going to have to wait till new ndiswrapper comes out. that, or instead of removing the new args, figure out what they're supposed to be now and fill them in

----------

## fallow

 *feint wrote:*   

> 
> 
> ```
> /root/ndiswrapper-0.11/driver/wrapper.c: In function `ndis_suspend_pci':
> 
> ...

 

there are  /include/linux/pci.h changes

in ndiswrapper-0.11/driver/wrapper.c try to change 

```

pci_save_state(pdev,handle->pci_state); 

to

pci_save_state(pdev);

```

and 

```
 

pci_restore_state(pdev,handle->pci_state); or  pci_restore_state(pdev,NULL);

to: 

pci_restore_state(pdev); 

```

and install by hand

greetings

----------

## DarwinianCoeus

my error is actually different

```
/var/tmp/portage/ndiswrapper-0.11/work/ndiswrapper-0.11/driver/ntoskernel.c:692:63: macro "kthread_run" requires 5 arguments, but only 3 given

/var/tmp/portage/ndiswrapper-0.11/work/ndiswrapper-0.11/driver/ntoskernel.c: In function `PsCreateSystemThread':

/var/tmp/portage/ndiswrapper-0.11/work/ndiswrapper-0.11/driver/ntoskernel.c:692: error: `kthread_run' undeclared (first use in this function)

/var/tmp/portage/ndiswrapper-0.11/work/ndiswrapper-0.11/driver/ntoskernel.c:692: error: (Each undeclared identifier is reported only once

/var/tmp/portage/ndiswrapper-0.11/work/ndiswrapper-0.11/driver/ntoskernel.c:692: error: for each function it appears in.)

make[3]: *** [/var/tmp/portage/ndiswrapper-0.11/work/ndiswrapper-0.11/driver/ntoskernel.o] Error 1

make[2]: *** [_module_/var/tmp/portage/ndiswrapper-0.11/work/ndiswrapper-0.11/driver] Error 2

make[2]: Leaving directory `/usr/src/linux-2.6.9-nitro1'

```

----------

## yamakawa

 *DarwinianCoeus wrote:*   

> my error is actually different
> 
> ```
> /var/tmp/portage/ndiswrapper-0.11/work/ndiswrapper-0.11/driver/ntoskernel.c:692:63: macro "kthread_run" requires 5 arguments, but only 3 given
> 
> ...

 

same here with plain 2.6.9

----------

## SPY_jmr1

doesn't really apply to ndiswrapper, but the same error is also fixed in ipw2100 package, thanks guys!

----------

## aja

 *fallow wrote:*   

> 
> 
> and install by hand
> 
> 

 

Fallow's advice is good, those line changes seem to fix the compile error.  However, you can get around the install by hand requirement with a little trick:

(1) emerge ndiswrapper, but hit ctrl-z (backgrounding the process) once the unpack stage is complete

(2) make the changes to the source file

(3) type fg to foreground the emerge process again.  It should continue, using the edited sources, and carry on with the install

----------

## yamakawa

I ended up with using CVS version. It compiled w/o trouble.

I made a tar ball of it, replacing the tar ball in the portage/distfiles and made appropriate changes in the digest file.

Then emerged the CVS version as the newest.   :Smile: 

----------

## Legoguy

Yes, use the CVS version. It works. Glad I found that it did too... otherwise i would be stuck w/o internet on this laptop...

----------

## aja

 *yamakawa wrote:*   

> I ended up with using CVS version. It compiled w/o trouble.
> 
> I made a tar ball of it, replacing the tar ball in the portage/distfiles and made appropriate changes in the digest file.
> 
> Then emerged the CVS version as the newest.  

 

Shame on you for lying to portage.  That's what an overlay is for.   :Smile: 

----------

## feint

Ndiswrapper works with the gentoo-dev-sources. I just wanted the mm-sources for Reiser4 support, but I just patched the gentoo-dev-sources. Thanks for the help though.

----------

## yamakawa

 *aja wrote:*   

>  *yamakawa wrote:*   I ended up with using CVS version. It compiled w/o trouble.
> 
> I made a tar ball of it, replacing the tar ball in the portage/distfiles and made appropriate changes in the digest file.
> 
> Then emerged the CVS version as the newest.   
> ...

 

Of course I did so in overlay tree....FYI.   :Very Happy: 

----------

