Skip to content

Commit

Permalink
use #pragma comment(lib) with _MSC_VER only
Browse files Browse the repository at this point in the history
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 #18709)

(cherry picked from commit 695cb63)
  • Loading branch information
vszakats authored and t8m committed Jul 11, 2022
1 parent a806fd8 commit 174954c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion providers/implementations/rands/seeding/rand_win.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 174954c

Please sign in to comment.