All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: Andrea Arcangeli <andrea@qumranet.com>
Cc: kvm-devel@lists.sourceforge.net, Chris Lalancette <clalance@redhat.com>
Subject: Re: Broken external module build on 2.6.23
Date: Mon, 11 Feb 2008 10:14:56 +0200	[thread overview]
Message-ID: <47B00400.3010306@qumranet.com> (raw)
In-Reply-To: <20080205231546.GH7441@v2.random>

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 <andrea@qumranet.com>
>
> --- 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 <davidel@xmailserver.org>
> - *
> - */
>   

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
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

  reply	other threads:[~2008-02-11  8:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-04 21:01 Broken external module build on 2.6.23 Chris Lalancette
     [not found] ` <47A77D2B.90902-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-02-05 23:15   ` Andrea Arcangeli
2008-02-11  8:14     ` Avi Kivity [this message]
2008-02-11 11:19       ` Andrea Arcangeli
2008-02-11 11:26         ` Andrea Arcangeli
2008-02-11 12:24         ` Avi Kivity
2008-02-11 12:24           ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47B00400.3010306@qumranet.com \
    --to=avi@qumranet.com \
    --cc=andrea@qumranet.com \
    --cc=clalance@redhat.com \
    --cc=kvm-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.