From 22dd336a9bcc948986b683bc50e970b7e154bf8f Mon Sep 17 00:00:00 2001 From: Pierre Le Marre Date: Thu, 14 Nov 2024 21:30:55 +0100 Subject: [PATCH] fix atomic types --- src/atom.c | 2 +- src/context.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/atom.c b/src/atom.c index e8632a302..7635652f3 100644 --- a/src/atom.c +++ b/src/atom.c @@ -200,7 +200,7 @@ atom_intern(struct atom_table *table, const char *string, size_t len, bool add) struct atom_table { size_t size; - char **strings; + _Atomic(char *) *strings; }; struct atom_table * diff --git a/src/context.h b/src/context.h index 51c9db328..6379d18fb 100644 --- a/src/context.h +++ b/src/context.h @@ -26,6 +26,8 @@ #ifndef CONTEXT_H #define CONTEXT_H +#include + #include "xkbcommon/xkbcommon.h" #include "atom.h" #include "messages-codes.h" @@ -35,7 +37,7 @@ #endif struct xkb_context { - int refcnt; + atomic_int refcnt; ATTR_PRINTF(3, 0) void (*log_fn)(struct xkb_context *ctx, enum xkb_log_level level,