summaryrefslogtreecommitdiffstats
path: root/src/json-c-2-fix-wincrypt-include.patch
blob: 83c5553bf959ba640be81faa68d0bbc66a6aba81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
This file is part of MXE.
See index.html for further information.

mingw32 doesn't include wincrypt.h in windows.h, so the build fails.

This is basically
https://github.com/ams-cs/json-c/commit/ca0ebe0f71b806f73a20d5d5e0da78aba5de42be

--- a/random_seed.c	2014-04-11 02:41:08.000000000 +0200
+++ b/random_seed.c	2014-10-12 20:07:32.419043270 +0200
@@ -181,7 +181,10 @@
 #define HAVE_CRYPTGENRANDOM 1
 
 #include <windows.h>
+#include <wincrypt.h>
+#ifndef __GNUC__
 #pragma comment(lib, "advapi32.lib")
+#endif
 
 static int get_cryptgenrandom_seed()
 {