]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/des.c
log: fix compilation failure on mingw due to reference to undefined set_color256
[ffmpeg] / libavutil / des.c
index 4598f324bc86dfab6a67d5e99b46779fb2f0fc1b..63eb7f52b5a7d511112f972783c28193d35013cb 100644 (file)
@@ -343,7 +343,7 @@ void av_des_mac(AVDES *d, uint8_t *dst, const uint8_t *src, int count) {
 #undef srand
 #include <stdlib.h>
 #include <stdio.h>
-#include <sys/time.h>
+#include "libavutil/time.h"
 static uint64_t rand64(void) {
     uint64_t r = rand();
     r = (r << 32) | rand();
@@ -390,13 +390,11 @@ int main(void) {
 #ifdef GENTABLES
     int j;
 #endif
-    struct timeval tv;
     uint64_t key[3];
     uint64_t data;
     uint64_t ct;
     uint64_t roundkeys[16];
-    gettimeofday(&tv, NULL);
-    srand(tv.tv_sec * 1000 * 1000 + tv.tv_usec);
+    srand(av_gettime());
     key[0] = AV_RB64(test_key);
     data = AV_RB64(plain);
     gen_roundkeys(roundkeys, key[0]);