]> granicus.if.org Git - json-c/commitdiff
Fix build using MinGW.
authorAndrew Stubbs <ams@codesourcery.com>
Mon, 4 Aug 2014 10:44:25 +0000 (11:44 +0100)
committerAndrew Stubbs <ams@codesourcery.com>
Mon, 4 Aug 2014 10:44:25 +0000 (11:44 +0100)
MinGW requires wincrypt.h.
GCC does not support #pragma comment, which trips Werror.

random_seed.c

index 3b520d411e8a8a161f5cc256e1d98a91c8e2b3e8..c47d271fb7270cad33974fd88f14c2393e3841eb 100644 (file)
@@ -181,7 +181,10 @@ static int get_dev_random_seed()
 #define HAVE_CRYPTGENRANDOM 1
 
 #include <windows.h>
+#include <wincrypt.h>
+#ifndef __GNUC__
 #pragma comment(lib, "advapi32.lib")
+#endif
 
 static int get_cryptgenrandom_seed()
 {