aboutsummaryrefslogtreecommitdiffstats
path: root/lib/builtins/atomic.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/builtins/atomic.c')
-rw-r--r--lib/builtins/atomic.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/builtins/atomic.c b/lib/builtins/atomic.c
index 0f82803a6416..32b3a0f9ad23 100644
--- a/lib/builtins/atomic.c
+++ b/lib/builtins/atomic.c
@@ -51,9 +51,11 @@ static const long SPINLOCK_MASK = SPINLOCK_COUNT - 1;
////////////////////////////////////////////////////////////////////////////////
#ifdef __FreeBSD__
#include <errno.h>
-#include <machine/atomic.h>
+// clang-format off
#include <sys/types.h>
+#include <machine/atomic.h>
#include <sys/umtx.h>
+// clang-format on
typedef struct _usem Lock;
__inline static void unlock(Lock *l) {
__c11_atomic_store((_Atomic(uint32_t) *)&l->_count, 1, __ATOMIC_RELEASE);