Add missing ifdef for extern "C"
authorLenny Komow <lenny@lunarg.com>
Mon, 27 Jul 2020 19:28:34 +0000 (13:28 -0600)
committerLenny Komow <lenny@lunarg.com>
Fri, 7 Aug 2020 19:09:29 +0000 (13:09 -0600)
include/vulkan/vk_icd.h

index 03411e7..0f992c0 100644 (file)
@@ -65,8 +65,9 @@ typedef VkResult (VKAPI_PTR *PFN_vk_icdEnumerateAdapterPhysicalDevices)(VkInstan
 
 // Prototypes for loader/ICD interface
 #if !defined(VK_NO_PROTOTYPES)
-extern "C"
-{
+#ifdef __cplusplus
+extern "C" {
+#endif
     VKAPI_ATTR VkResult VKAPI_CALL vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t* pVersion);
     VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetInstanceProcAddr(VkInstance instance, const char* pName);
     VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetPhysicalDeviceProcAddr(VkInstance isntance, const char* pName);
@@ -74,8 +75,10 @@ extern "C"
     VKAPI_ATTR VkResult VKAPI_CALL vk_icdEnumerateAdapterPhysicalDevices(VkInstance instance, LUID adapterLUID,
         uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices);
 #endif
+#ifdef __cplusplus
 }
 #endif
+#endif
 
 /*
  * The ICD must reserve space for a pointer for the loader's dispatch