]> Savannah Git Hosting - gnulib.git/commit
getrandom: Fix compilation errors on older versions of mingw.
authorBruno Haible <bruno@clisp.org>
Sun, 28 Jun 2020 17:04:03 +0000 (19:04 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 28 Jun 2020 17:04:03 +0000 (19:04 +0200)
commit70872213ef6614cf52d5978a5fdf8b9e628fc786
treebf3f6360d542ec1b345851d3503aa696060b5a41
parente6856168aaa96cbda1c01add379831eca98130c0
getrandom: Fix compilation errors on older versions of mingw.

Reported by Eli Zaretskii <eliz@gnu.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-06/msg00059.html>.

* m4/getrandom.m4 (gl_FUNC_GETRANDOM): Test whether <bcrypt.h> exists.
* lib/getrandom.c: If <bcrypt.h> is not available, include <ntdef.h> and
define/declare BCRYPT_ALG_HANDLE, BCRYPT_USE_SYSTEM_PREFERRED_RNG,
BCryptGenRandom ourselves.
ChangeLog
lib/getrandom.c
m4/getrandom.m4