Skip to content

Commit

Permalink
KVM: Make kvm header C++ friendly
Browse files Browse the repository at this point in the history
Two things needed fixing: 1) g++ does not allow a named structure type
within an anonymous union and 2) Avoid name clash between two padding
fields within the same struct by giving them different names as is
done elsewhere in the header.

Signed-off-by: Nathan Binkert <nate@binkert.org>
Signed-off-by: Avi Kivity <avi@redhat.com>
  • Loading branch information
nathan binkert authored and Avi Kivity committed Jun 10, 2009
1 parent ede2ccc commit 2f8b9ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/linux/kvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ struct kvm_run {
__u32 error_code;
} ex;
/* KVM_EXIT_IO */
struct kvm_io {
struct {
#define KVM_EXIT_IO_IN 0
#define KVM_EXIT_IO_OUT 1
__u8 direction;
Expand Down Expand Up @@ -224,10 +224,10 @@ struct kvm_interrupt {
/* for KVM_GET_DIRTY_LOG */
struct kvm_dirty_log {
__u32 slot;
__u32 padding;
__u32 padding1;
union {
void __user *dirty_bitmap; /* one bit per page */
__u64 padding;
__u64 padding2;
};
};

Expand Down

0 comments on commit 2f8b9ee

Please sign in to comment.