History

hwcontext_vulkan: fix CreateSemaphore conflict with synchapi.h

Include windows.h to fix it. Normally, it'd be better to include it in vulkan_functions.h, but I'm reasonably confident nothing else that uses the Vulkan code will need to include Windows functions and not windows.h.

Lynne committed 5 years ago

Commit 296cb991 parent 57e11321 file · +7 −6Browse files

Unified · Split

libavutil/hwcontext_vulkan.c+7−6
@@ -19,6 +19,13 @@ · 18 unmodified lines
1919 #define VK_NO_PROTOTYPES
2020 #define VK_ENABLE_BETA_EXTENSIONS
2121
22+#ifdef _WIN32
23+#include <windows.h> /* Included to prevent conflicts with CreateSemaphore */
24+#include "compat/w32dlfcn.h"
25+#else
26+#include <dlfcn.h>
27+#endif
28+
2229 #include <unistd.h>
2330
2431 #include "config.h"
@@ -32,12 +39,6 @@ · 7 unmodified lines
3239
3340 #include "vulkan_loader.h"
3441
35−#ifdef _WIN32
36−#include "compat/w32dlfcn.h"
37−#else
38−#include <dlfcn.h>
39−#endif
40−
4142 #if CONFIG_LIBDRM
4243 #include <xf86drm.h>
4344 #include <drm_fourcc.h>

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t