]> O.S.I.I.S - jp/vkhelpers.git/commitdiff
Added check for STDC Version
authorLinuxLegend <Tyler@linuxdev.app>
Mon, 28 Mar 2022 11:13:39 +0000 (05:13 -0600)
committerLinuxLegend <Tyler@linuxdev.app>
Mon, 28 Mar 2022 11:13:39 +0000 (05:13 -0600)
include/vkh.h

index 5436943a8985dba4804239b05357879aba91abf4..700d46a24d8d7479e3de1f4320da1dd8fd0b62ce 100644 (file)
@@ -30,12 +30,13 @@ extern "C" {
 
 #include <vulkan/vulkan.h>
 
-#if defined(STDC_NO_THREADS)
-#include "deps/tinycthread.h"
-#else
+#if __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_THREADS__)
 // For platforms outside of Windows, Threads.h is provided for by compiler that supports C11 standard.
 #include <threads.h>
+#else
+#include "deps/tinycthread.h"
 #endif
+
 typedef enum VmaMemoryUsage VmaMemoryUsage;
 
 #include <stdlib.h>