uwp_fix.patch 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. diff --git a/thirdparty/openssl/crypto/rand/rand_win.c b/thirdparty/openssl/crypto/rand/rand_win.c
  2. index 06670ae01..cb4093128 100644
  3. --- a/thirdparty/openssl/crypto/rand/rand_win.c
  4. +++ b/thirdparty/openssl/crypto/rand/rand_win.c
  5. @@ -118,8 +118,10 @@
  6. # ifndef _WIN32_WINNT
  7. # define _WIN32_WINNT 0x0400
  8. # endif
  9. +#ifndef UWP_ENABLED // -- GODOT --
  10. # include <wincrypt.h>
  11. # include <tlhelp32.h>
  12. +#endif // -- GODOT --
  13. /*
  14. * Limit the time spent walking through the heap, processes, threads and
  15. @@ -161,7 +163,7 @@ typedef struct tagCURSORINFO {
  16. # define CURSOR_SHOWING 0x00000001
  17. # endif /* CURSOR_SHOWING */
  18. -# if !defined(OPENSSL_SYS_WINCE)
  19. +# if !defined(OPENSSL_SYS_WINCE) && !defined(UWP_ENABLED) // -- GODOT --
  20. typedef BOOL(WINAPI *CRYPTACQUIRECONTEXTW) (HCRYPTPROV *, LPCWSTR, LPCWSTR,
  21. DWORD, DWORD);
  22. typedef BOOL(WINAPI *CRYPTGENRANDOM) (HCRYPTPROV, DWORD, BYTE *);
  23. @@ -196,6 +198,7 @@ typedef NET_API_STATUS(NET_API_FUNCTION *NETFREE) (LPBYTE);
  24. # endif /* 1 */
  25. # endif /* !OPENSSL_SYS_WINCE */
  26. +#if !defined(UWP_ENABLED) // -- GODOT --
  27. int RAND_poll(void)
  28. {
  29. MEMORYSTATUS m;
  30. @@ -580,6 +583,8 @@ int RAND_poll(void)
  31. return (1);
  32. }
  33. +#endif // UWP_ENABLED // -- GODOT --
  34. +
  35. int RAND_event(UINT iMsg, WPARAM wParam, LPARAM lParam)
  36. {
  37. double add_entropy = 0;
  38. @@ -682,7 +687,7 @@ static void readtimer(void)
  39. static void readscreen(void)
  40. {
  41. -# if !defined(OPENSSL_SYS_WINCE) && !defined(OPENSSL_SYS_WIN32_CYGWIN)
  42. +# if !defined(OPENSSL_SYS_WINCE) && !defined(OPENSSL_SYS_WIN32_CYGWIN) && !defined(UWP_ENABLED) // -- GODOT --
  43. HDC hScrDC; /* screen DC */
  44. HBITMAP hBitmap; /* handle for our bitmap */
  45. BITMAP bm; /* bitmap properties */
  46. diff --git a/thirdparty/openssl/openssl/dtls1.h b/thirdparty/openssl/openssl/dtls1.h
  47. index 30bbcf278..81d28c29c 100644
  48. --- a/thirdparty/openssl/openssl/dtls1.h
  49. +++ b/thirdparty/openssl/openssl/dtls1.h
  50. @@ -78,6 +78,9 @@
  51. # include <sys/time.h>
  52. # endif
  53. # endif
  54. +#ifdef UWP_ENABLED // -- GODOT start --
  55. +#include <winsock2.h>
  56. +#endif // -- GODOT end --
  57. #ifdef __cplusplus
  58. extern "C" {