* lib/getrandom.c: Don't include <ntdef.h>. Instead, define NTSTATUS.
* m4/getrandom.m4 (gl_FUNC_GETRANDOM): Include <windows.h> before
<bcrypt.h>.
+2020-07-03 Bruno Haible <bruno@clisp.org>
+
+ getrandom: Fix compilation error on native Windows (regr. 2020-06-28).
+ * lib/getrandom.c: Don't include <ntdef.h>. Instead, define NTSTATUS.
+ * m4/getrandom.m4 (gl_FUNC_GETRANDOM): Include <windows.h> before
+ <bcrypt.h>.
+
2020-07-03 Bruno Haible <bruno@clisp.org>
dfa tests: Follow common file naming conventions.
# if HAVE_BCRYPT_H
# include <bcrypt.h>
# else
-# include <ntdef.h> /* NTSTATUS */
+# define NTSTATUS LONG
typedef void * BCRYPT_ALG_HANDLE;
# define BCRYPT_USE_SYSTEM_PREFERRED_RNG 0x00000002
# if HAVE_LIB_BCRYPT
-# getrandom.m4 serial 6
+# getrandom.m4 serial 7
dnl Copyright 2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
case "$host_os" in
mingw*)
- AC_CHECK_HEADERS([bcrypt.h])
+ AC_CHECK_HEADERS([bcrypt.h], [], [],
+ [[#include <windows.h>
+ ]])
AC_CACHE_CHECK([whether the bcrypt library is guaranteed to be present],
[gl_cv_lib_assume_bcrypt],
[AC_COMPILE_IFELSE(