Author: mturk Date: Mon Oct 5 16:57:00 2009 New Revision: 821909 URL: http://svn.apache.org/viewvc?rev=821909&view=rev Log: Allow Win32 compilation
Modified: commons/sandbox/runtime/trunk/src/main/native/port/arc4random.c Modified: commons/sandbox/runtime/trunk/src/main/native/port/arc4random.c URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/port/arc4random.c?rev=821909&r1=821908&r2=821909&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/native/port/arc4random.c (original) +++ commons/sandbox/runtime/trunk/src/main/native/port/arc4random.c Mon Oct 5 16:57:00 2009 @@ -43,9 +43,11 @@ #include "acr_arch.h" #include "acr_port.h" +#if defined(ACR_WANT_ARC4RANDOM) +#if !defined(WIN32) #include <sys/time.h> +#endif -#if defined(ACR_WANT_ARC4RANDOM) struct arc4_stream { unsigned char i; unsigned char j; @@ -107,7 +109,7 @@ * ever expect > 2^31 bytes of data at once without the prng * coming to a complete halt. */ - CryptGenRandom(hProv, (DWORD)sizeof(rdat.rnd), rdat.rnd); + CryptGenRandom(hProv, (DWORD)sizeof(rdat.rnd), (unsigned char *)rdat.rnd); CryptReleaseContext(hProv, 0); } #else