util: fix stack dynarray used by multiple tus
authorGeorg Lehmann <dadschoorse@gmail.com>
Wed, 5 Apr 2023 09:55:51 +0000 (11:55 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 25 May 2023 15:46:35 +0000 (15:46 +0000)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23106>

src/util/meson.build
src/util/u_dynarray.c [new file with mode: 0644]
src/util/u_dynarray.h

index 3765618..190eb5e 100644 (file)
@@ -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 (file)
index 0000000..a4b8d11
--- /dev/null
@@ -0,0 +1,8 @@
+/*
+ * Copyright 2023 Valve Corporation
+ * SPDX-License-Identifier: MIT
+ */
+
+#include "u_dynarray.h"
+
+unsigned util_dynarray_is_data_stack_allocated;
index 769669e..b8fff5b 100644 (file)
@@ -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.