mirror of
https://gitee.com/openharmony/third_party_vulkan-loader
synced 2024-11-23 15:20:52 +00:00
layers: Windows define fixes
On windows WinBase.h redefines CreateSemaphore and synchapi.h redefines CreateEvent. Depending on order or header includes, this can break the build due to VkLayerDispatchTable struct having CreateSemaphore and CreateEvent members. To fix this conflict, undef those symbols after including windows.h.
This commit is contained in:
parent
b0ccaaf390
commit
bd4964ff19
@ -198,6 +198,14 @@ static inline void loader_platform_thread_cond_broadcast(loader_platform_thread_
|
||||
// Headers:
|
||||
#include <WinSock2.h>
|
||||
#include <windows.h>
|
||||
// WinBase.h defines CreateSemaphore and synchapi.h defines CreateEvent
|
||||
// undefine them to avoid conflicts with VkLayerDispatchTable struct members.
|
||||
#ifdef CreateSemaphore
|
||||
#undef CreateSemaphore
|
||||
#endif
|
||||
#ifdef CreateEvent
|
||||
#undef CreateEvent
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <io.h>
|
||||
|
Loading…
Reference in New Issue
Block a user