diff --git a/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c b/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c index 0319375f..6da6b21b 100644 --- a/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +++ b/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #ifndef _MSC_VER # include @@ -86,9 +87,10 @@ sodium_hrtime(void) #else { struct timeval tv; - int ret = gettimeofday(&tv, NULL); - (void)ret; - assert(ret == 0); + + if (gettimeofday(&tv, NULL) != 0) { + abort(); + } ts = ((uint64_t) tv.tv_sec) * 1000000U + (uint64_t) tv.tv_usec; } #endif