summaryrefslogtreecommitdiff
path: root/providers
diff options
context:
space:
mode:
authorViktor Szakats <commit@vsz.me>2022-07-03 22:30:06 +0000
committerTomas Mraz <tomas@openssl.org>2022-07-11 10:36:28 +0200
commit695cb63c744bab090144a86949b68324ee3094d6 (patch)
tree2dc04941dffe0dc15185080eac90c4de936a01ae /providers
parent0648ec1c35a54fb2b7ead34a215691fe9e38516d (diff)
downloadopenssl-new-695cb63c744bab090144a86949b68324ee3094d6.tar.gz
use #pragma comment(lib) with _MSC_VER only
Avoid this warning when compiled with llvm/gcc + mingw-w64 and `USE_BCRYPTGENRANDOM` enabled: ``` ../providers/implementations/rands/seeding/rand_win.c:31:11: warning: unknown pragma ignored [-Wunknown-pragmas] ^ 1 warning generated. ``` CLA: trivial Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18709)
Diffstat (limited to 'providers')
-rw-r--r--providers/implementations/rands/seeding/rand_win.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/providers/implementations/rands/seeding/rand_win.c b/providers/implementations/rands/seeding/rand_win.c
index 704705425a..a21b74dd86 100644
--- a/providers/implementations/rands/seeding/rand_win.c
+++ b/providers/implementations/rands/seeding/rand_win.c
@@ -28,7 +28,9 @@
# ifdef USE_BCRYPTGENRANDOM
# include <bcrypt.h>
-# pragma comment(lib, "bcrypt.lib")
+# ifdef _MSC_VER
+# pragma comment(lib, "bcrypt.lib")
+# endif
# ifndef STATUS_SUCCESS
# define STATUS_SUCCESS ((NTSTATUS)0x00000000L)
# endif