From 86fc4bf065d2f71c955ba2356b5b442fec596014 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 14 Dec 2016 14:14:28 +0100 Subject: Define RtlGenRandom correctly in ntsecapi.h wrapper Include ntsecapi.h where required and just redefine RtlGenRandom correctly in the ntsecapi.h wrapper. Signed-off-by: Corinna Vinschen --- winsup/cygwin/ntsecapi.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 winsup/cygwin/ntsecapi.h (limited to 'winsup/cygwin/ntsecapi.h') diff --git a/winsup/cygwin/ntsecapi.h b/winsup/cygwin/ntsecapi.h new file mode 100644 index 000000000..8b0a7e77f --- /dev/null +++ b/winsup/cygwin/ntsecapi.h @@ -0,0 +1,26 @@ +#ifndef _CYGWIN_NTSECAPI_H +#define _CYGWIN_NTSECAPI_H + +/* There's a bug in ntsecapi.h (Mingw as well as MSFT). SystemFunction036 + is, in fact, a WINAPI function, but it's not defined as such. Therefore + we have to do it correctly here in the ntsecapi.h wrapper. */ + +#define SystemFunction036 __nonexistant_SystemFunction036__ + +#include_next + +#undef SystemFunction036 + +#define RtlGenRandom SystemFunction036 + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +BOOLEAN WINAPI RtlGenRandom (PVOID, ULONG); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _CYGWIN_NTSECAPI_H */ -- cgit v1.2.3