mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
gstdtlscertificate: Define _WINSOCKAPI_ before including windows.h
This avoid a build failure when compiling against OpenSSL 3.2.0. The problem is when windows.h is included before WinSock2.h. Because windows.h includes winsock.h[1]. Defining _WINSOCKAPI_ stops windows.h including winsock.h. Error: ``` [748/1041] Compiling C object ext/dtls/gstdtls.dll.p/gstdtlscertificate.c.obj FAILED: ext/dtls/gstdtls.dll.p/gstdtlscertificate.c.obj [...] Windows Kits\10\include\10.0.17763.0\shared\ws2def.h(235): error C2011: 'sockaddr': 'struct' type redefinition Windows Kits\10\include\10.0.17763.0\um\winsock.h(482): note: see declaration of 'sockaddr' ``` [1] https://stackoverflow.com/a/1372836 Closes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3167 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5770>
This commit is contained in:
parent
651dcb4912
commit
81169fca8e
1 changed files with 1 additions and 0 deletions
|
@ -39,6 +39,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef G_OS_WIN32
|
#ifdef G_OS_WIN32
|
||||||
|
#define _WINSOCKAPI_
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#ifdef X509_NAME
|
#ifdef X509_NAME
|
||||||
#undef X509_NAME
|
#undef X509_NAME
|
||||||
|
|
Loading…
Reference in a new issue