diff --git a/tjunittest.c b/tjunittest.c index e30a91a4..08d8fe21 100644 --- a/tjunittest.c +++ b/tjunittest.c @@ -36,6 +36,10 @@ #include #include "./tjutil.h" #include "./turbojpeg.h" +#ifdef _WIN32 + #include + #define random() rand() +#endif void usage(char *progName) @@ -587,6 +591,9 @@ void bufSizeTest(void) int main(int argc, char *argv[]) { int doyuv=0, i; + #ifdef _WIN32 + srand((unsigned int)time(NULL)); + #endif if(argc>1) { for(i=1; i