Skip to content

Commit 36fb9e8

Browse files
committed
x86: Include libcflat.h in atomic.h for u64 typedef
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); Link: https://lore.kernel.org/r/20250221204148.2171418-2-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent a33a3ac commit 36fb9e8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/x86/atomic.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
#include "asm-generic/atomic.h"
55

6+
#include "libcflat.h"
7+
68
typedef struct {
79
volatile int counter;
810
} atomic_t;

0 commit comments

Comments
 (0)