From 12d5a2aa97a61b51d53f23a1a4650aca1a02c508 Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Wed, 5 Apr 2023 11:55:51 +0200 Subject: [PATCH] util: fix stack dynarray used by multiple tus Reviewed-by: Rhys Perry Part-of: --- src/util/meson.build | 1 + src/util/u_dynarray.c | 8 ++++++++ src/util/u_dynarray.h | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 src/util/u_dynarray.c diff --git a/src/util/meson.build b/src/util/meson.build index 37656186623..190eb5ecf6e 100644 --- a/src/util/meson.build +++ b/src/util/meson.build @@ -135,6 +135,7 @@ files_mesa_util = files( 'u_debug_refcnt.h', 'u_dl.c', 'u_dl.h', + 'u_dynarray.c', 'u_dynarray.h', 'u_endian.h', 'u_hash_table.c', diff --git a/src/util/u_dynarray.c b/src/util/u_dynarray.c new file mode 100644 index 00000000000..a4b8d117e2d --- /dev/null +++ b/src/util/u_dynarray.c @@ -0,0 +1,8 @@ +/* + * Copyright 2023 Valve Corporation + * SPDX-License-Identifier: MIT + */ + +#include "u_dynarray.h" + +unsigned util_dynarray_is_data_stack_allocated; diff --git a/src/util/u_dynarray.h b/src/util/u_dynarray.h index 769669e1e70..b8fff5b8a52 100644 --- a/src/util/u_dynarray.h +++ b/src/util/u_dynarray.h @@ -36,7 +36,7 @@ extern "C" { #endif -static unsigned util_dynarray_is_data_stack_allocated; +extern unsigned util_dynarray_is_data_stack_allocated; /* A zero-initialized version of this is guaranteed to represent an * empty array.