Mesa (main): gallium/util: add some extern "C" guards

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Oct 16 11:01:51 UTC 2021


Module: Mesa
Branch: main
Commit: 8a42ea69a69ffc7264345b37add2360486fb2515
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8a42ea69a69ffc7264345b37add2360486fb2515

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Mon Sep 13 23:28:04 2021 -0400

gallium/util: add some extern "C" guards

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13285>

---

 src/gallium/auxiliary/util/u_async_debug.h       | 8 ++++++++
 src/gallium/auxiliary/util/u_live_shader_cache.h | 8 ++++++++
 2 files changed, 16 insertions(+)

diff --git a/src/gallium/auxiliary/util/u_async_debug.h b/src/gallium/auxiliary/util/u_async_debug.h
index b192a01f99b..5f27d21d294 100644
--- a/src/gallium/auxiliary/util/u_async_debug.h
+++ b/src/gallium/auxiliary/util/u_async_debug.h
@@ -37,6 +37,10 @@
 #include "util/u_debug.h"
 #include "util/simple_mtx.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct util_debug_message {
    unsigned *id;
    enum pipe_debug_type type;
@@ -71,4 +75,8 @@ u_async_debug_drain(struct util_async_debug_callback *adbg,
       _u_async_debug_drain(adbg, dst);
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* UTIL_ASYNC_DEBUG_H */
diff --git a/src/gallium/auxiliary/util/u_live_shader_cache.h b/src/gallium/auxiliary/util/u_live_shader_cache.h
index b6e6e32c76e..99ed5ec9789 100644
--- a/src/gallium/auxiliary/util/u_live_shader_cache.h
+++ b/src/gallium/auxiliary/util/u_live_shader_cache.h
@@ -52,6 +52,10 @@
 #include "util/simple_mtx.h"
 #include "pipe/p_state.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct util_live_shader_cache {
    simple_mtx_t lock;
    struct hash_table *hashtable;
@@ -88,4 +92,8 @@ util_shader_reference(struct pipe_context *ctx,
                       struct util_live_shader_cache *cache,
                       void **dst, void *src);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif



More information about the mesa-commit mailing list