Skip to content

Commit

Permalink
fix compilation issue of cyptonight on windows (#3762)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangying000 authored Oct 1, 2022
1 parent 2ff4f81 commit 5112a5d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions consensus/cryptonight-rs/ext/oaes_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@
#endif

// ANDROID, FreeBSD, OpenBSD and NetBSD also don't need timeb.h
// use sys/timeb.h for glibc <= 2.31, or MSVC
#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__ANDROID__) \
&& !defined(__NetBSD__) \
&& (defined(__GLIBC__) && __GLIBC__ <= 2 && __GLIBC_MINOR__ < 31)
&& ((defined(__GLIBC__) && __GLIBC__ <= 2 && __GLIBC_MINOR__ < 31) || defined(_MSC_VER))
#include <sys/timeb.h>
#else
// use gettimeofday to get rid of `ftime` warning if glibc >= 2.31
Expand Down Expand Up @@ -509,7 +510,7 @@ static void oaes_get_seed( char buf[RANDSIZ + 1] )
static uint32_t oaes_get_seed(void)
{
#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__ANDROID__) && !defined(__NetBSD__) \
&& (defined(__GLIBC__) && __GLIBC__ <= 2 && __GLIBC_MINOR__ < 31)
&& ((defined(__GLIBC__) && __GLIBC__ <= 2 && __GLIBC_MINOR__ < 31) || defined(_MSC_VER))
struct timeb timer;
struct tm *gmTimer;
char * _test = NULL;
Expand Down

0 comments on commit 5112a5d

Please sign in to comment.