mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
Build fixes for MinGW.
threads.h: use windows.h headers for clock stuff on MinGW strategyselector.c: assert with strlen for MinGW support
This commit is contained in:
parent
a4efbbe680
commit
56c537e145
|
@ -121,9 +121,10 @@ static void* strategyselector_choose_for(const strategy_list * const strategies,
|
|||
char *override = NULL;
|
||||
int i = 0;
|
||||
|
||||
// Because VS doesn't support snprintf, let's just assert that there is more
|
||||
// than enough room.
|
||||
assert(strnlen(strategy_type, 200));
|
||||
// Because VS doesn't support snprintf, let's assert that there is
|
||||
// enough room in the buffer. Max length for strategy type is
|
||||
// buffersize (256) - prefix including terminating zero.
|
||||
assert(strlen(strategy_type) < 256 - sizeof("KVAZAAR_OVERRIDE_") );
|
||||
sprintf(buffer, "KVAZAAR_OVERRIDE_%s", strategy_type);
|
||||
|
||||
override = getenv(buffer);
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
#if defined(__GNUC__) && !defined(__MINGW32__)
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
|
||||
|
|
Loading…
Reference in a new issue