Andrea Arcangeli wrote:
> On Mon, Feb 04, 2008 at 04:01:31PM -0500, Chris Lalancette wrote:
>   
>> Hello,
>>      The merge with upstream changeset: 
>> af5ca3f4ec5cc4432a42a73b050dd8898ce8fd00
>> broke building an external module against 2.6.23:
>>
>>   CC [M]  /root/kvm-userspace/kernel/kvm_main.o
>> /root/kvm-userspace/kernel/kvm_main.c:1271: error: unknown field ‘name’
>> specified in initializer
>>
>> Which makes sense, since the .name parameter doesn't exist pre-2.6.24.  I've
>> been trying to think of a way to work around it in external-module-compat.h, 
>> but
>> have so far been unsuccessful.  Does anyone have any good ideas?
>>     
>
> This will solve it:
>
> Signed-off-by: Andrea Arcangeli <[EMAIL PROTECTED]>
>
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -1267,7 +1279,11 @@ static int kvm_resume(struct sys_device *dev)
>  }
>  
>  static struct sysdev_class kvm_sysdev_class = {
> +#ifdef set_kset_name
> +     set_kset_name("kvm"),
> +#else
>       .name = "kvm",
> +#endif
>       .suspend = kvm_suspend,
>       .resume = kvm_resume,
>  };
>
>
>   

I fixed it in a different way (in hack-module.awk) as I don't like 
compatibility stuff in mainline.

> diff --git a/kernel/include/asm-x86/cmpxchg.h 
> b/kernel/include/asm-x86/cmpxchg.h
> deleted file mode 100644
> index 4258b93..0000000
> --- a/kernel/include/asm-x86/cmpxchg.h
> +++ /dev/null
> @@ -1,5 +0,0 @@
> -/*
> - * Empty file to satisfy #include <linux/cmpxchg.h> for older kernels.
> - */
> -
> -
>   


What happens if you compile kvm against a kernel that doesn't have 
linux/cmpxchg.h?

> diff --git a/kernel/include/linux/anon_inodes.h 
> b/kernel/include/linux/anon_inodes.h
> deleted file mode 100644
> index b2e1ba3..0000000
> --- a/kernel/include/linux/anon_inodes.h
> +++ /dev/null
> @@ -1,16 +0,0 @@
> -/*
> - *  include/linux/anon_inodes.h
> - *
> - *  Copyright (C) 2007  Davide Libenzi <[EMAIL PROTECTED]>
> - *
> - */
>   

Or linux/anon_inodes.h?  etc.

-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to