summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Stubbs <ams@codesourcery.com>2014-08-04 11:44:25 +0100
committerAndrew Stubbs <ams@codesourcery.com>2014-08-04 11:44:25 +0100
commitca0ebe0f71b806f73a20d5d5e0da78aba5de42be (patch)
tree1ff4959cea8e691ab6359e0c75e6ac4a31ea6e79
parentd4e81f9ec8273914739808737fa0a27a3f0589fb (diff)
Fix build using MinGW.
MinGW requires wincrypt.h. GCC does not support #pragma comment, which trips Werror.
-rw-r--r--random_seed.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/random_seed.c b/random_seed.c
index 3b520d4..c47d271 100644
--- a/random_seed.c
+++ b/random_seed.c
@@ -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()
{