diff --git a/src/util/u_debug.c b/src/util/u_debug.c index 7282179c122..f14a260622c 100644 --- a/src/util/u_debug.c +++ b/src/util/u_debug.c @@ -30,6 +30,7 @@ #include "util/u_debug.h" #include "util/u_string.h" #include "util/u_math.h" +#include "c11/threads.h" #include #include @@ -378,8 +379,8 @@ debug_dump_enum(const struct debug_named_value *names, const char * debug_dump_flags(const struct debug_named_value *names, uint64_t value) { - static char output[4096]; - static char rest[256]; + static thread_local char output[4096]; + static thread_local char rest[256]; int first = 1; output[0] = '\0';