diff --git a/ChangeLog.d/windows_pragma_lib_bcrypt.txt b/ChangeLog.d/windows_pragma_lib_bcrypt.txt new file mode 100644 index 0000000000..a5792ff251 --- /dev/null +++ b/ChangeLog.d/windows_pragma_lib_bcrypt.txt @@ -0,0 +1,3 @@ +Changes + * When building with MSVC, it is no longer necessary to link with bcrypt.lib + explicitly. diff --git a/library/entropy_poll.c b/library/entropy_poll.c index 1c8a29d6e2..39f3e4d9ef 100644 --- a/library/entropy_poll.c +++ b/library/entropy_poll.c @@ -42,6 +42,10 @@ #include #include +#if defined(_MSC_VER) +#pragma comment( lib, "bcrypt.lib" ) +#endif /* _MSC_VER */ + int mbedtls_platform_entropy_poll(void *data, unsigned char *output, size_t len, size_t *olen) {