[kvm-unit-tests PATCH 1/2] x86: Include libcflat.h in atomic.h for u64 typedef

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

 



Include libcflat.h in x86's atomic.h to pick up the u64 typedef, which is
used to define atomic64_t.  The missing include results in build errors if
a test includes atomic.h without (or before) libcflat.h.

  lib/x86/atomic.h:162:1: error: unknown type name ‘u64’
  162 | u64 atomic64_cmpxchg(atomic64_t *v, u64 old, u64 new);

Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
---
 lib/x86/atomic.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/x86/atomic.h b/lib/x86/atomic.h
index 13e734bb..3c7a89eb 100644
--- a/lib/x86/atomic.h
+++ b/lib/x86/atomic.h
@@ -3,6 +3,8 @@
 
 #include "asm-generic/atomic.h"
 
+#include "libcflat.h"
+
 typedef struct {
 	volatile int counter;
 } atomic_t;
-- 
2.48.1.601.g30ceb7b040-goog






[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