Re: [PATCH] Fix non-KVM build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael S. Tsirkin wrote:
> On Wed, Jun 24, 2009 at 01:13:46PM -0500, Anthony Liguori wrote:
>> This introduces some #ifdefs in pcspk to fix the build when KVM isn't enabled.
>>
>> Signed-off-by: Anthony Liguori <aliguori@xxxxxxxxxx>
>> ---
>>  hw/pcspk.c |   15 +++++++++------
>>  1 files changed, 9 insertions(+), 6 deletions(-)
>>
>> diff --git a/hw/pcspk.c b/hw/pcspk.c
>> index 9e1b59a..236995a 100644
>> --- a/hw/pcspk.c
>> +++ b/hw/pcspk.c
>> @@ -80,11 +80,6 @@ static void kvm_set_pit_ch2(PITState *pit,
>>          kvm_set_pit(kvm_context, inkernel_state);
>>      }
>>  }
>> -#else
>> -static inline void kvm_get_pit_ch2(PITState *pit,
>> -                                   kvm_pit_state *inkernel_state) { }
>> -static inline void kvm_set_pit_ch2(PITState *pit,
>> -                                   kvm_pit_state *inkernel_state) { }
>>  #endif
>>  
> 
> The version with stubs looks cleaner to me. IMO we really should be
> moving away from ifdefs for features, and only use them for
> compiler-specific things.  If for no other reason, then because it
> increases the common code that is compiled for all platforms,
> decreasing the chance that people submit a patch that does not
> build on soe platform.
> 
> Is the issue with struct kvm_pit_state?
> Can't we just stub it out as well?
> 
> struct kvm_pit_state {};

It's solved like that in current git. Do you still face problems?

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux