Module: Mesa Branch: main Commit: f64f74b8f23f16c46f06ea192a2c6e48df43c4c9 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f64f74b8f23f16c46f06ea192a2c6e48df43c4c9
Author: Dmitry Osipenko <[email protected]> Date: Mon Jun 27 20:00:56 2022 +0300 util/disk_cache: Make disk_cache_os.h usable by C++ code The cache tests are written in C++ and the upcoming new Mese-DB cache tests will need to include disk_cache_os.h that misses extern "C" modifier required by C++ linkage. Add the modifier. Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Dmitry Osipenko <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16888> --- src/util/disk_cache_os.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/util/disk_cache_os.h b/src/util/disk_cache_os.h index 9fbd4bbbffc..7be6a26e689 100644 --- a/src/util/disk_cache_os.h +++ b/src/util/disk_cache_os.h @@ -34,6 +34,10 @@ #include "util/fossilize_db.h" +#ifdef __cplusplus +extern "C" { +#endif + /* Number of bits to mask off from a cache key to get an index. */ #define CACHE_INDEX_KEY_BITS 16 @@ -141,6 +145,10 @@ disk_cache_mmap_cache_index(void *mem_ctx, struct disk_cache *cache, void disk_cache_destroy_mmap(struct disk_cache *cache); +#ifdef __cplusplus +} +#endif + #endif #endif /* DISK_CACHE_OS_H */
