From cd4571700a8fe118f549b0b3447e773082d22e49 Mon Sep 17 00:00:00 2001 From: Amin Ya Date: Thu, 27 Feb 2025 15:26:31 -0800 Subject: [PATCH] fix: conditional cstdio include in vk_mem_alloc (#8265) Based on https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/blob/05973d8aeb1a4d12f59aadfb86d20decadba82d1/include/vk_mem_alloc.h#L2842 Co-authored-by: Powei Feng --- third_party/vkmemalloc/include/vk_mem_alloc.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/third_party/vkmemalloc/include/vk_mem_alloc.h b/third_party/vkmemalloc/include/vk_mem_alloc.h index d56ab15185..133b8fdb84 100644 --- a/third_party/vkmemalloc/include/vk_mem_alloc.h +++ b/third_party/vkmemalloc/include/vk_mem_alloc.h @@ -126,8 +126,6 @@ See documentation chapter: \ref statistics. extern "C" { #endif -#include - #ifndef VULKAN_H_ #include #endif @@ -296,6 +294,10 @@ extern "C" { #define VMA_STATS_STRING_ENABLED 1 #endif +#if VMA_STATS_STRING_ENABLED + #include // For snprintf +#endif + //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// //